WP Categories and Posts
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.
Other RA Project Articles

24. Mar, 2007 





Author Info
Excellent job Ronald!
I will have to use this on my site also.
Thanks for sharing it with everyone.
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.
Clean, simple and extremely useful. Thank you so much!!!
John,
I’m glad you found it useful. Thank you.
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.
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!
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.
Thanks for replying. Okay, the sitemap.php is in my Themes directory. But I’m not sure how to create a page template.
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
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
Wow! Thanks! No problem. I like your plugin and I’m going to write about it in my other blog. =)
GOOD WORKED
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?
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.
I justed tested this plugin on WP 2.3 RC1 and everything works fine. This plugin should be compatible with the new release.
Ronald..thanks for checking the new RC!
John,
Yeah, to be honest, I’m surprised it still worked
With the changes in the database schema, I am afraid several of my plugins, notably EventCalendar3 are not going to survive the upgrade.
Hi! Is there a parameter to limit the number of post displayed (like the last N posts) ?
Thanks for your great work!
Andrea
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.
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?
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.
Nuts. I need the link on my site map but I don’t want it on another template. Thanks for the prompt response!!
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.
Ronald…sweet patch. Does exactly what I was looking for. Props and my thanks!!
Great plugin! How can I stop the date from being shown?
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.
@lex et al,
My apologies, but this plugin is no longer updated. Anyone is free to take it over.
hey, i need to know how it is possible to show only the post titles without the following date!
thanks a lot.
Nice plugin.
I am using Clean Archives. Now i am gonna try this one. Thanks.
Is it possible to say only show the 3 most recent posts from each category? Thanks!
@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
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?
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.