Category Posts Widget 3.2

Adds the much requested option to change the sort order of the posts. Check it out at the plugin directory.

I know this is a long time coming but I’ve been super busy with school. I don’t like to mess with something that works. I know of a few other plugins that do the same thing and more but I don’t like to add a hundred different features that only a handful of people need. I think one of the features of CPW is its minimal feature set. It functions as advertised; no more no less. That, in my opinion, is how good software should work.

Based on the ratings and comments it seems most people enjoy the plugin. Sadly, I don’t have time to answer everyone’s questions. I’d suggest posting on the WordPress.org forums. Thanks for all the support.

Update: The random sort bug should be fixed now. Sorry for the delay.

58 thoughts on “Category Posts Widget 3.2

  1. Hi,
    Thanks for the widget and the update.

    I was wondering if you could add a feature, or tell me how to, to make the posts in this category look just like the posts of the main theme. I am a total noob when it comes to code but am good at following clear directions.

    I basically want to use this widget to make my front page have two separate streams that are style the same way.

    I am using wordpress 3.1 and the Pagelines Platform (free) theme. You can see my site here. http://www.backpackrats.com

    Thanks,
    Adam

    • Hi Adam, I wouldn’t use a sidebar widget such as this for that. Look into multiple loops. I unfortunately don’t have time to walk you through how to do it but that article should get you started. The WordPress.org forums is probably you’re best bet for help.

  2. The plugin is great, but seems to have a bug. If I set your widget to show on all post pages for a specific category, it won’t show on post pages that have been assigned more than one category.

    For example, if I have two posts, Post 1 and Post 2, and I want to put your widget on both of these post pages . . . if Post 2 is assigned more than one category, when I navigate to Post 2, your widget will not show up.

  3. Brilliant improvement – to sort the posts eg. alphabetically. Makes the category (region) post lists (like in the sidebar here) much easier to use.
    Thanks a lot
    Kjetil

  4. Your plugin is very well (thanks for it) but
    1st) You should “rand” in WP_Query ($sort_by) instead of “random” because it doesn’t work for now.
    2nd) You should allow to show empty (‘hide_empty’ => 0,’hide_if_empty’ => false) categories because in nested category structure, while one of category does’n has post, children of it can have and users would like to show these categories’ posts.
    Regards.

  5. Hi, I’ve made a changes to add the posibility to show author avatar and author name. How can I send you the code to see if you consider to add to the project?

  6. Hi,
    I had a problem with the new version 3.2. I don’t want any title, so I left that empty. The widget then used the name of the category as a title, and showed the post titles as regular text.

  7. Hi,
    nice plugin, however I have a small problem.
    On my homepage only the Category name appears, on all other pages and posts it appears like I want it to, with 3 posts below the Category name. Is it intentional or something wrong at my site?

      • Hey, glad I found this post. I also can’t get the random feature to work, date and comment sorting are fine.
        I want to showcase a random girl from our MAc Chick gallery in the footer, and if set to RANDOM it just shows the latest. So I have it set to MOST COMMENTS at the moment, but that also never changes.

        Thanks for the widget, it’s awesome.

        - The Doc

  8. love the plugin! thanks for your hard work. Quick question: I would like to add a link at the end of the posts list (‘more news…’ which will link to our website’s news category). Where do I insert my link w/in the widget’s PHP?

    best,

  9. Hi James. Installed your plugin today and it’s only sorting alphabetically asc/dec (known issue), but was wondering how I could force it to sort only by Date in the code? That’s the only method of softing which is needed, so the other sort options don’t matter (eg, title, comments, random). Thanks!

  10. The thumbnail option isn’t showing up in my settings. I’m running WP 3.1 and your latest (3.2). What could be the problem?

    Thanks – Joe

  11. Hi James

    Thank you for the plugin. I added the php to display the category description. Let me know if I should pass on the code.

    My question is: the WordPress generated thumbnails are not displayed but rather the whole image and is then distorted to fit the dimentions I specified for the thumbnail. How do I fix this?

    Thank you
    -K

  12. Hi, James,

    Thanks for the widget and the update.

    I got a problem while using this widget on my web site. My web site is a multilingual site, with both English and Chinese. When configuring the Widget, I chose 20 characters to be displayed for the excerpt. If the post content is English, it is working all fine, I mean, the 20 characters are displayed; but if the content is Chinese, what is displayed is way more than 20 characters. So do you have any tip or work-around to give?

    Thanks!

  13. Hey James,
    The plugin works fine on my blog. However, it has disabled the individual page layout options in the Genesis framework. Can you suggest a solution for this?

    Regards,
    Gaurav

  14. Hey there,

    Thank you for this great plugin.

    In the current version its not possible to style the widget differently depending on the category as it does not add any category specific (read slug) details to the widget class. I have few modifications to make it possible. Now the plugin ads the category slug to the “class” attribute of the widget with out the need for other plugins to achieve this and individual category widgets can be styled to suit the need. Kindly let me know how I can forward the code to you.

    Thank you,

    Praveen

  15. I’m running WP 3.1.3 but I don’t see how to add thumbnails to my widget. How do I make the first image uploaded to the post so that it automatically shows up in the post widget in thumnail size?

  16. Hey, first – I love your plugin, exactly what I was looking for. Thanks a bunch. You’re awesome.
    But I’m facing a problem, I can’t get the thumbnail to work, I’m working with the Atahualpa theme, and wp 3.1 .

  17. James, your pluging is fantastic, how can I donate a small amount just for thanks?
    this pluging is in my top 20 wp-plugings list. I’ll write a review about it! :)

    just it seems it has a small problem, it shows only 12 categories, not all. I have 36 categories and sub categories. it seems it doesn’t show sub cats. :(

    I hope you find time for answer.
    Cheers

  18. Hi, James, thank you very much for a great plagin, exactly what i was looking for.
    I only have one problem with it: i could add it on my page just 2 times, any other my trying brought nothing. I have only 6 categories, but i would like to put them all through your widget to main page.

    Thank you again

  19. I am trying to add 3 of these widgets to a current 3.2 WordPress installation, I am using a WooTheme with video content and i want the embedded video to show up in the widget. I added this code:

    to line 173 of cat-posts.php, and it works, until I go into the admin and start adding posts or adding plugins I get the error:
    Warning: Cannot modify header information – headers already sent by (output started at /home/difdesig/public_html/wp-content/plugins/category-posts/cat-posts.php:525) in /home/difdesig/public_html/wp-includes/pluggable.php on line 934
    Do you have any insight?

  20. Hello,

    We are using WP v3.2.1

    The widget is not showing anything under the heading. When do you think this plugin will be updated?

    We are just wanting to select poems to be placed into a BEST POEMS category and display a list below header in the right sidebar.

    Thanks

  21. I needed to have a version of this plugin that offset the posts by a user specifiable setting. I did this by adding “&offset=” . $instance["offset"] . to the get post query and by modifying the form with a field that asks for an offset.

    <label for="get_field_id(“offset”); ?>”>
    :
    <input style="text-align: center;" id="get_field_id(“offset”); ?>” name=”get_field_name(“offset”); ?>” type=”text” value=”" size=’3′ />

    Please consider adding this to the official release so I don’t have to have a branch to maintain.

  22. I recently helped to upgrade a blog from WP 2.8.4. to the current version. It was also using an older version of your Category Posts plugin, which was upgraded to the latest version as well.

    I would like the posts displayed to be in title, but it appears this function is not working – currently, the posts are displaying by date. Ticking the “reverse sort order” box seems to have no effect either – the only function I want that seems to be working (beyond the actual display of the posts) is the “number of posts to show.”

    Bug? Possible conflict with another plugin (there are 20+)? Any insights that you have would be appreciated!

  23. I have just installed your plugin, and it is working very well apart from one thing. No thumbnails are showing up. I already have an image associated with each post. I was expecting that to show up, as it does elsewhere throughout my theme

    I notice a number of other people have had the same problem, and you haven’t answered any of them. If it doesn’t work, please say so. If it does, please explain how to get the thumbnails to show up.

  24. Hi James

    Thank you so much for this really useful plugin. I had to make a couple of tiny mods to the plugin and am not sure whether you are at all interested in the couple of lines of code I added. It basically was to check each list item’s post ID against the $post_old->ID and attaching a ‘current_post_item’ class to that list item if the two are equal. Means I was able to style current items in the sidebar.

    I know you’re busy and am not sure if you are able to / want to respond to such comments, but thought I’d throw it out there if you are interested, or if the idea alone is of interest.

    Thanks again for the time you put into this plugin. It works wonderfully for me.

    John Sparrow

  25. Hi James – plugin is exactly what I’ve been looking for but when activated the plugin overrides all my pages showing excerpts and they go blank!? Has anyone else had this problem? Tks

  26. Hey there,
    first of all, thanks for this great plugin.
    I just noticed a problem with it, though. When I use in the sitebar of the single.php, I believe the wordpress loop gets mixed up and displays wrong content. Everything works great except the function the_content() shows text from a totally different post… how can that be?
    Best regards

  27. Hey there just added your plugin to my site. The random function is not working and I can see in the comments its been like that for some time.

    Any chance of a fix soon or should I just look for another plugin :(

    //Theis

  28. Hi James,
    good plugin indeed, thanks to share.
    Someone knows how to change excerpt limit from “word” to “character”?
    For a plugin that fits in a box it’s important to know exactly how many characters can fill and “Parallelepiped” take more space than “Hi” :) but both count for 1 word.
    Any helps is appreciated, thanks in advance.

    Mac

  29. Hi, great little plugin!
    Question – how can you incorporate CSS into the widget? I would like to add some font attributes. I don’t really know php well, to know where to add it in the Editor.
    Thank you-

  30. Hi James, excellent plugin! Thanks for your hard work.

    I have a multi-lingual site (using the qtranslate plugin) the posts are translated but the widget title malfunctions.

    I’ve manually updated the code since last update and wonder if u could consider including the fix in your future udpdates?

    From:

    if( $instance["title_link"] )
    echo ‘‘ . $instance["title"] . ‘‘;
    else
    echo $instance["title"];

    To:

    if( $instance["title_link"] )
    echo ‘‘ . __($instance["title"]) . ‘‘;
    else
    echo __($instance["title"]);

    Many thanks

    /Lars

  31. Thanks for the plugin James. Does exactly what I need for a WP 3.1.4 installation.

    Do let me know if you find yourself in Melbourne, Australia one day and I can thank you in person over a tea||coffee||b33r.

  32. hi, awesome plugin!

    i’d like to have my thumbnails link to the whole category it belongs to, instead of to it’s permalink.

    what code do i need and where do i put it?

    please let me know, thanks so much

    ray

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>