Recent Blog Posts

Archives

Subscribe

Latest Tweets

Follow us on Twitter

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.



5 Responses to “WordPress Category Posts Plugin 2.0”

  1. Mrs_Brown Says:

    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:

    Mrs_Brown,

    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. Alicia Says:

    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.

  4. B3 Says:

    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?

  5. B3 Says:

    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 ”;
    }

    ?>

Leave a Reply