WP Categories and Posts
By Ronald Huereca on Mar 24, 2007.
WP Categories and Posts now has a new page and author. Please visit the new WP Categories and Posts Page on the Phill McDonnell website.
WP Categories and Posts is an extension of the core WordPress function called wp_list_categories. This plugin adds in a template tag you can use to display categories and sub categories and the posts underneath those categories.
For working examples, please see the following pages:
- Reader Appreciation Project Sitemap
- Ronalfy.com Sitemap
- Books Love Me Sitemap
- Untwisted Vortex Extended Categories
Here is a screenshot as well.

Download
Please download the file WP Categories and Posts v1.0.
Installation
Installation is simple. Just unzip into your plugins folder and activate the plugin. From there, you may call the function ronalfy_list_categories_and_posts() from within your WordPress page.
An example page template called sitemap.php is included in the zip file. You can copy this file into your themes directory and use it as a page template for your sitemap if you wish.
Usage
The function by itself will return the categories and posts. It will accept most of the same arguments as wp_list_categories, but not all of them. One argument that I noticed that didn’t work was showcount.
Support
This plugin is provided as is, but I will try to answer most of your questions in the comments. Thank you.

[...] grown” plugins that are suited to benefit readers. The first such plugin is called WP Categories and Posts. The plugin enables blog authors to easily set up a sitemap that lists all of the categories (and [...]
Pingback by WordPress and WordPress Plugins » Reader Appreciaton Project — March 24, 2007 @ 5:03 pm
Excellent job Ronald!
I will have to use this on my site also.
Thanks for sharing it with everyone.
Comment by Bes — March 24, 2007 @ 5:24 pm
You’re welcome Bes. Let me know if you have any problems with the implementation. It should just be a simple function call and some added styles into your stylesheet.
Comment by Ronald Huereca — March 25, 2007 @ 11:37 am
[...] WP Categories and Posts is an extension of the wp_list_categories. Instead of listing just categories, the plugin lists the post under the each category as well. This is very useful for a sitemap. [...]
Pingback by Weblog Tools Collection » Blog Archive » WordPress Plugin Releases for 3/26 — March 26, 2007 @ 12:21 am
[...] WP Categories and Posts » Reader Appreciaton Project (tags: plugins wordpress) [...]
Pingback by links for 2007-03-26 at L’urlo del coniglio — March 26, 2007 @ 7:23 am
Clean, simple and extremely useful. Thank you so much!!!
Comment by John P. — March 26, 2007 @ 7:34 am
[...] WP Categories and Posts is an extension of the wp_list_categories. Instead of listing just categories, the plugin lists the post under the each category as well. This is very useful for a sitemap. [...]
Pingback by New Wordpress Plugins Released 26 March 2007 » TheSMSGuide Blog » Blog Archive — March 26, 2007 @ 1:16 pm
John,
I’m glad you found it useful. Thank you.
Comment by Ronald Huereca — March 26, 2007 @ 1:35 pm
[...] WP Categories and Posts es una extensión de wp_list_categories. En lugar de listar solamente las categorÃas, el plugin también lista las entradas dentro de cada categorÃa. Este plugin es sumamente útil para la elaboración de un mapa de sitio. [...]
Pingback by WeblogToolsCollection Español » Blog Archive » Plugins de WordPress publicados 26/3 — March 27, 2007 @ 6:26 am
[...] WP Categories and Posts » Reader Appreciaton Project Plugin de Wordpress que te permite mostrar las categorias listadas pero con sus respectivos articulos entre medio. Ideal para sitemaps. (tags: wordpress plugin plugins sitemap categories) [...]
Pingback by links for 2007-03-28 en newdisco — March 31, 2007 @ 5:06 am
This was exactly what I spent hours looking for, but it doesn’t work for me:
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 341251 bytes) in
I shouldn’t have to increase memory allocation.
Also, how about some documentation and examples?
I want to create a page and list specific categories, with the titles of each entry linking to the archive page.
Should be simple, it’s not. Hopefully your plugin can do this.
Comment by David Evans — March 31, 2007 @ 6:06 am
Hi there,
This might be a useful plugin for me but I can’t find the sitemap page anywhere! Can you explain more? Would appreciate it!
Thanks!
Comment by Josette — March 31, 2007 @ 6:39 am
David,
Since this plugin is just an extension of a WordPress template tag, you’ll find the documentation at the WordPress codex site for wp_list_categories. As stated above in the “Usage”, not all of the same arguments will work, however.
Josette,
A sample sitemap.php template is included in the zip file. You must copy this file over to your theme directory and set up a new page using this file as a template. You can find more about this at WordPress pages.
Comment by Ronald Huereca — March 31, 2007 @ 7:38 am
Thanks for replying. Okay, the sitemap.php is in my Themes directory. But I’m not sure how to create a page template.
Comment by Josette — March 31, 2007 @ 7:51 am
Creating a page:
In your WP Dashboard, click on “Write”. After that, click on “Write
Page”. On the right side, there is a thing called “Page Template”.
There should be a drop down where you can select “Sitemap”. If
Sitemap isn’t there, it’s possible that the sitemap.php file was
copied to the wrong theme folder.
I hope that helped
Comment by Ronald Huereca — March 31, 2007 @ 7:55 am
[...] WP Categories and Posts is an extension of the core WordPress function called wp_list_categories. This plugin adds in a template tag you can use to display categories and sub categories and the posts underneath those categories. [...]
Pingback by Untwisted Vortex - Living in a Different Land » WP Plugins: Exec-PHP, Smart Archives, and WP Categories and Posts — March 31, 2007 @ 8:19 am
Josette,
I added a link to your sitemap as an example. I hope you don’t mind. If any one else has working examples, I’d be happy to add a few more example links.
Thanks,
Ronald
Comment by Ronald Huereca — March 31, 2007 @ 8:49 am
Wow! Thanks! No problem. I like your plugin and I’m going to write about it in my other blog. =)
Comment by Josette — March 31, 2007 @ 8:54 am
[...] WP Categories and Posts is an extension of the wp_list_categories. Instead of listing just categories, the plugin lists the post under the each category as well. This is very useful for a sitemap. [...]
Pingback by WP Plugins April 4, 2007 « Blogtology — April 10, 2007 @ 8:25 pm
[...] Simple Yearly Archive Plugin is very similar to the Clean Archives plugin. Both allow you to display your posts categories by year and offer different display options. For a way to show your archives by categories, check out a plugin called Categories and Posts. [...]
Pingback by Devlounge | Friday Focus #29 — May 4, 2007 @ 4:19 pm
[...] WP Categories and Posts – I wrote about this before in my WP Plugins: Exec-PHP, Smart Archives, and WP Categories and Posts article and referenced it in other articles. My Extended Categories page is based on it. [...]
Pingback by WordPress Plugins I Use - Untwisted Vortex - Living in a Different Land — May 21, 2007 @ 4:56 am
GOOD WORKED
Comment by maxNLO — June 10, 2007 @ 12:35 am
[...] Visit [...]
Pingback by WP Plugins DB » Plugin Details » WP Categories and Posts — July 4, 2007 @ 11:26 pm
[...] a small bit of code snipped from the wordpress codex, a great plugin from the raproject and a copy of your default 404.php you can help viewers find what they were looking for (and then [...]
Pingback by 1guy » Custom 404 for Wordpress — July 31, 2007 @ 4:07 am
Still love this plugin. I foresee a day where my site map will be a scrolling nightmare as the months and years go by. Maybe an AJAX implementation which could collapse/expand the index for posts older than a certain date?
Comment by John P. — August 20, 2007 @ 10:35 am
Hey John,
That’s a good suggestion. I didn’t really plan on releasing updates to this, but that would be really cool to have. I have a few more projects on the pipeline, but I’ll definitely see what I can do (or can’t do). It may be a while (a few months), so keep in touch.
Comment by Ronald Huereca — August 20, 2007 @ 5:26 pm
I justed tested this plugin on WP 2.3 RC1 and everything works fine. This plugin should be compatible with the new release.
Comment by Ronald Huereca — September 19, 2007 @ 2:41 pm
Ronald..thanks for checking the new RC!
Comment by John P. — September 21, 2007 @ 7:28 am
John,
Yeah, to be honest, I’m surprised it still worked
Comment by Ronald Huereca — September 21, 2007 @ 8:17 am
With the changes in the database schema, I am afraid several of my plugins, notably EventCalendar3 are not going to survive the upgrade.
Comment by John P. — September 21, 2007 @ 9:31 am
Hi! Is there a parameter to limit the number of post displayed (like the last N posts) ?
Thanks for your great work!
Andrea
Comment by Andrea — October 9, 2007 @ 12:38 pm
Andrea,
I have one more plugin to write before I visit this plugin again, but when I do, I’ll be sure to add something like this in.
Comment by Ronald Huereca — October 9, 2007 @ 1:44 pm
[...] was all for it, and I released my second WordPress plugin called Categories and Posts. The plugin was fairly popular and brought in some links, which was nice. My ultimate goal was to [...]
Pingback by Case Study: Ajax Edit Comments and Technorati » Reader Appreciation Project — October 12, 2007 @ 5:16 pm
Ronald…I’m trying to suppress the category name/link and just show the list items of the category. I passed the “title_li=” argument in your function but it didn’t seem to work. Any ideas?
Comment by John P. — October 18, 2007 @ 6:03 am
John,
I’m afraid you’re going to have to edit the raw code. If I’m interpreting what you want correctly, you want to change line 126 from this:
to this:
I apologize that there isn’t a more elegant solution.
Comment by Ronald Huereca — October 18, 2007 @ 4:53 pm
Nuts. I need the link on my site map but I don’t want it on another template. Thanks for the prompt response!!
Comment by John P. — October 18, 2007 @ 5:23 pm
John,
I sent you an e-mail last night with a modified version that will allow you to do what you want to do. Hopefully it didn’t end up in your spam box.
Comment by Ronald Huereca — October 19, 2007 @ 4:09 am
Ronald…sweet patch. Does exactly what I was looking for. Props and my thanks!!
Comment by John P. — October 19, 2007 @ 5:36 am
[...] at Reader Appreciation Project linked his WP Categories and Plugins plugin page to my categories page as an example of the "plugin in [...]
Pingback by Link Frenzy: Backlink Bonanza #5 — January 11, 2008 @ 9:50 pm
Great plugin! How can I stop the date from being shown?
Comment by Mark — March 23, 2008 @ 4:57 am
I would also like to know how to remove the date and how to prevent the main parent category from showing up before each child category.
Comment by lex — April 17, 2008 @ 2:56 pm
@lex et al,
My apologies, but this plugin is no longer updated. Anyone is free to take it over.
Comment by Ronald Huereca — April 17, 2008 @ 6:48 pm
hey, i need to know how it is possible to show only the post titles without the following date!
thanks a lot.
Comment by hazel — August 17, 2008 @ 4:55 pm
Nice plugin.
I am using Clean Archives. Now i am gonna try this one. Thanks.
Comment by javed Khalil — September 25, 2008 @ 8:14 am
Is it possible to say only show the 3 most recent posts from each category? Thanks!
Comment by Dave Rigotti — February 4, 2009 @ 12:12 pm
@All,
There is a new developer on board for this plugin. I will point him to this post to get an idea of what the user base is wanting as far as features.
I foresee in the near future (as soon as the plugin is added to WP Extend) that this post will automatically redirect to the new plugin author’s site.
Take care,
Ronald
Comment by Ronald Huereca — February 25, 2009 @ 10:56 pm
I am trying to order posts that appear within each category alphabetically. By default, it is ordering by date. But I can’t get it to change. Please assist?
Comment by Cade — February 26, 2009 @ 9:22 pm
Please note that this plugin has a new author.
Please visit the new page for WP Categories and Posts.
Please allow a few days for the transition.
Comments will now be closed for this post.
Comment by Ronald Huereca — February 26, 2009 @ 10:42 pm