Showing category specific wordpress posts

by Deepanshu | Add comments

Displaying category specific posts in a wordpress blog is easy. Inside theme folder the you will find “index.php” and “sidebar.php” templates, you have to put a query_posts functions which refer to specific category ID numbers from your database. Example:

<?php query_posts('showposts=1&cat=4'); ?>

You will need to change them to reflect the ID numbers in your own database. They can be found in your control panel under Manage->Categories.

idnumbers1.gif

Result will be the recent posts from the category no.4

Tags: Blogging, Tutorials

Add a Comment

required, use real name
required, will not be published
optional, your blog address

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Related Articles:



Main Blog | Report Abuse
Create Your FREE Blog | Log in