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.
Open Source Software, Watershed Studio, WordPress, WordPress Category Posts Plugin, WordPress Plugins
This entry was posted
on Friday, September 5th, 2008 at 12:08 am and is filed under Server Side Software, Watershed News, WordPress, WordPress Plugins.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
September 10th, 2008 at 7:21 am
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.
September 10th, 2008 at 9:58 am
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 '';- ID) . '">' . $post->post_title . '
foreach( (array) $posts as $post ) {
echo '
';
}
echo '
';
And of course you could change that to suit your needs.
September 19th, 2008 at 11:25 am
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.
September 21st, 2008 at 3:33 pm
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: http://pastebin.com/f3a213bfe
Best regards!
October 1st, 2008 at 10:17 pm
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.
Dave
November 20th, 2008 at 6:35 pm
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.
Cheers.
Scotty Zee
December 8th, 2008 at 6:45 pm
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.
April 1st, 2009 at 2:26 pm
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?
April 1st, 2009 at 3:00 pm
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 ”;
}
?>
April 28th, 2009 at 7:25 am
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.
May 9th, 2009 at 6:43 am
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.
July 8th, 2009 at 6:14 am
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
October 13th, 2009 at 8:54 am
How to use this plugin?
ı write “wp_cat_posts(21);” in a page but not shown posts?
October 15th, 2009 at 2:53 pm
Hi
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
Thanks
Lee
November 1st, 2009 at 9:55 pm
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?
December 10th, 2009 at 10:04 am
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 http://www.healthwantednow.com/category/cancer/
Is it something in the plugin or is it something I did?
Please help!