March 23, 2019

WordPress Category Posts Plugin 2.0

The WordPress Category Posts plugin, version 2.0, has been released and is now available for download via the WordPress Extend Plugin Directory.  WordPress Category Posts is a plugin for WordPress that creates a linked list of the posts in a specific category.


  1. Hallo, and thank you for this useful plugin. Is it correct, as the source code shows, that the tag wp_cat_posts does not create a list (li and /li) when wrapped like this: (ul)(?php wp_cat_posts(12); ?)(/ul)? I would like to affect each single link with my CSS-dfinitions.

  2. Brian Groce says:


    This is currently used as a very basic display of all posts in a specific category and it is not always ideal to force it into a list. (In the future we’ll add that option, as a number of people have requested it.)

    To force it into a list you’d change the code to something like this:

    echo '


    And of course you could change that to suit your needs.

  3. I’ve written a backwards-compatible patch to this plugin that will allow users to specify, via extra parameters, the number of posts they would like to display as well as how to display these posts (as before, or wrapped in a list item element like wp_get_archives() does).

    How best can I submit this patch to you for inclusion in the next version of the plugin?

    If anyone is interested in getting it in the mean time, you can find it, and instructions, on my website.

  4. Hi!

    Firstly, thanks for the useful plugin.
    I’ve modified this one to be used as a widget too. I think widgetize it can bring lots of possibilities like brought to me.
    Check out the code here:

    Best regards!

  5. G’day from Australia and many thanks for this plugin although I had to modify it slightly to work with the theme.

    But I am still perplexed as how to limit the number of posts returned. Is there something in the parameters or do I have to hack the core files?

    This plugin absolutely replaces the need for a sitemap, as I have set it to show on the Category page, just above the Post Extract in that specific Category.

    Nice Job guys – it just needs this one little addition to make it perfect.


  6. Gday,
    What’s the line of code I have to insert?

    It is not shown on the wordpress plugin page. It say to insert this line of code but then doesn’t display it.


    Scotty Zee

  7. I like this plugin, you can add some easy to change parmeters in the function call that will help address some of the issues that people are having. Something like

    function wp_cat_posts( $catID = 0, $start = '', $end = '', $numberposts = -1, order = 'ASC', orderby = 'title' )

    and replace everything in there with variables instead of hard coding it. Could possible help in the advent of adding this information in the admin panel and keep people from editing your file and risking an update messing up their websites.

  8. i find this really great, but i wish it would post the category above it, instead of listing all posts.. is there a way of this?

  9. I guess i ended up answering my own question.
    Calling Plugin

    plugin code
    function wp_cat_posts( $catID = 0 ) {
    $catID = (int) $catID;
    $category = get_cat_name($catID);

    $posts = get_posts(array(‘category’ => $catID, ‘numberposts’ => -1, ‘order’ => ASC, ‘orderby’ => title));
    echo ” . $category;
    foreach( (array) $posts as $post ) {
    echo ‘ID) . ‘”>’ . $post->post_title . ‘‘;
    echo ”;


  10. This is a nice very plugin. I just upgraded to the latest version coz the first version doesn’t work with WP 2.7.1

    It’s working fine BUT how can I limit the number of results?

    wp_cat_posts(#) returns all the posts in the category.

    Please advice.

  11. how do you limit the amount of post links that show up? right now it’s listing every single post in that category. I want to make it so that it’s set to only list a certain amount. Thanks.

  12. Hi there everybody,

    first of all thank you very much for that kinda good plugin, i want to list only today’s posts by date, how can i do that? i am really in need of that asap.

    if you can help me i will be very

    thank you from now

  13. How to use this plugin?

    ı write “wp_cat_posts(21);” in a page but not shown posts?

  14. Lee Shields says:


    Is there a way to add a style to category post items from the title.

    EG the title of the group is Mercury, is there any way to add class = ‘widget mercury’ to the h3 tag. Basically I need to use a new colour for each category



  15. I think your post above that’s supposed to tell me how to make it display as a list got garbled by wordpress it doesn’t make any sense to me… I think it tried to turn you php code into a link? not sure, anyway is there an easy way to do this or another plugin that will make a list instead of just links?

  16. Hello, this plugin worked well but suddenly the post lit in a category is showing some strange positioning (over navigation, in an extra layer ets. Please see at
    Is it something in the plugin or is it something I did?
    Please help!

Speak Your Mind


This site uses Akismet to reduce spam. Learn how your comment data is processed.