This is my new simple WordPress plugin that allows you to list: (1) the latest 5 or 7 posts in a category by the category ID, (2) all posts in the category by category ID, and (3) all posts with their excerpts in the category by category ID.
Plugin Concepts
Well, before writing this plugin, I was looking for a plugin that can list the latest post in category, as well as all the posts in the category (with and without the post excerpt). Mainly, I just want to use the listing of all posts + excerpts in category ID function, so I can use it to list all the posts + excerpt as a CATEGORY TYPE II - according to my SEOed site architectural blueprint on link/page-rank distribution. (CATEGORY TYPE I is the default WordPress category.php page that usually list the latest 10 posts (configurable in the “Options => Reading” admin area).
Anyway, because I could not find a way to ‘automatically’ create these CATEGORY TYPE II pages with all its posts and post excerpts, I had adapted another solution to have an option that let the WordPress admin choose “the Number of Posts to show per Category page” in the Best WordPress Template’s “Presentation => Entry” configuration back-end.
Plugin Features
Nevertheless, I had included this plugin in the downloads of the Best WordPress Template + plugins package, because some of you may want to use the default WordPress category page and could use this plugin to create the CATEGORY TYPE II pages to display all the category’s posts and post excerpts => so you can spread the link-love/link-power evenly to all the posts.
Also, there are 2 functions that you can use to display the “Latest Post from Category (ID)” in this plugin, which will be discussed in the “Plugin Usage” section below.
Plugin To-Do List
- Use Wordpress Codex API instead of SELECT database.
- Add parameter(s) so user can choose the # of posts in the category by category ID to display along with optional post excerpts.
Plugin Installation
Installation is like any WordPress plugin:
1. Download the Best WordPress Template + plugins package
2. Unzip
3. Upload posts-in-category.php to wp-content/plugins on your server
4. Activate the plugin
5. Use the output functions (see “Plugin Usage” below) in your template or sidebar widgets if you’re using PHP widgets.
You can find full details of installing a plugin on the how to install a WordPress plugin page.
Plugin Usage
There are 4 output php functions that you can use:
- <?php posts_in_cat($catID) ?> = this php function will output a list of all posts wrapped in the <li> tags in the specified category ID (replace $catID with the category ID):
<li><a href=”Post1-Permalink-URL” title=”Post-Title”>Post-Title</a></li>
<li><a href=”Post2-Permalink-URL” title=”Post2-Title”>Post2-Title</a> </li>…
- <?php excerpt_posts_in_cat($catID) ?> = this php function will output a list of all posts and post excerpts wrapped in the <li> tags in the specified category ID (replace $catID with the category ID):
<li><a href=”Post1-Permalink-URL” title=”Post-Title”>Post-Title</a> - Post1 Excerpt</li>
<li><a href=”Post2-Permalink-URL” title=”Post2-Title”>Post2-Title</a> - Post2 Excerpt</li> …
- <?php latest_5_in_cat($catID) ?> = this php function will output a list of the latest 7 posts wrapped in the <li> tags in the specified category ID (replace $catID with the category ID):
<li><a href=”Post1-Permalink-URL” title=”Post-Title”>Post-Title</a></li>
<li><a href=”Post2-Permalink-URL” title=”Post2-Title”>Post2-Title</a> </li>…
- <?php latest_7_in_cat($catID) ?> = this php function will output a list of the latest 7 posts wrapped in the <li> tags in the specified category ID (replace $catID with the category ID):
<li><a href=”Post1-Permalink-URL” title=”Post-Title”>Post-Title</a></li>
<li><a href=”Post2-Permalink-URL” title=”Post2-Title”>Post2-Title</a> </li>…
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
If you like "List/Latest Posts in Category ID WordPress Plugin,"
please consider linking to this article:


Can’t find the link to download.
Reply to this comment »is is for wordpress 2.6 ? and whereis the download link?
Reply to this comment »Thanks