Related Posts by Category Widget

Official WordPress LogoNicasio Design is proud to announce the launch of of our second publicly available WordPress plugin: Related Posts by Category Widget

This is a customizable widget that allows you to feature posts that share the same categories as the current post you are currently viewing.

This widget is obviously only shown on the single post page.

Download Here.

Screenshot after the break.

Related Posts by Category Widget

19 comments have been made... Be the next person to leave a comment.

Comments:

  1. 1
    Erlend Sogge Heggen

    Awesome plugin! I hope you sometimes read the Wordpress.com plugin forum dedicated to your plugin though, because I left some suggestions there :)

  2. 2
    Brent Weber

    Dan,

    Thanks for much for this plugin. I did find one small error in the code that won’t let you display a list without the category name.

    Line 81:
    if($data['showname'] = ‘yes’) {
    Needs to be changed to:
    if($data['showname'] == ‘yes’) {

    Good job on the plugin.

  3. 3
    RJ

    Good solution for CMS oriented sites. I would like one addition: could the title be dynamically populated with the current category title? This would great.

  4. 4
    cecile

    A great plugin, simple to use and very efficient.
    Thanks

  5. 5
    Catch 22

    You have a soft bug in the code. The code echo $after_widget; is located AFTER the closing bracket for the if (is single). That may break the layout in home.

  6. 6
    Catch 22

    Is there a way I could insert a bit of code like this

    in substitution for the display of $related?

    Thanks.

  7. 7
    Fabio

    Hi Dan. Thanks for the great plug-in!
    I noticed I couldn’t show more than 5 posts in the same category. So I changed the get_posts function in your code to:

    $catposts = get_posts(‘numberposts=’.$data['disp'].’&category=’.$category->cat_ID.’&exclude=’.$exclude_string.’&’.$order_str);

    Expanding the default numberposts value of 5 to whatever the user defines in the widget configuration. I thought you might want to add that to a new version…

    Regards,
    Fabio

  8. 8
    mas

    Hello, I am looking for related post widget by category that work under category page, not just in single post. Can you help me? Thanks

  9. 9
    Randy

    The code from Fabio works, but if you copy and paste make sure to check that the single quotes copied right. Mine were right and left quotes at first.

  10. 10
    Dmitry

    Fabio, thx for your patch. Now pluggin correct works.

  11. 11
    cecile

    Hello

    Thanks for a great and simple plugin.
    the only thing is whatever I ask for the number of posts to show for a category, it is limited to a maximum of 5.
    Any idea what I could do to change this ?

    thanks

  12. 12
    cecile

    Hello

    Thanks for your plugin.
    I have but a small problem, I cannot show more than 5 posts for a category, although I wrote I wanted 10 of them in the widget admin.
    May you help please ?

    thanks

  13. 13
    Aphrodite

    hiya !

    Good one indeed ! Just a question : how to have several instances possible for it ??? I have several sidebars but only one instance possible :(

  14. 14
    Anna

    RJ’s idea is great. I’d love to see this as well.

  15. 15
    Marc

    So many things in the directions were very confusing to me. If I could write my own script, I wouldn’t need a plugin.

  16. 16
    WhiskeyJim

    This plugin is both functional and efficient. I have been using it for quite some time.

    Unfortunately it conflicts with the Catalyst theme which I am adapting for my use; it ‘breaks’ the sidebar. I have no idea how:)

  17. 17
    andri mercedes

    Hi, I can not use the plugins on my blog… it is not compatible with the theme i am using?

  18. 18
    Gordon

    Is it possible to use this plugin to vary the header image depending upon WHICH URL the user visits?

    I have a single WordPress installation, but several domains point to it.

    I want to have a different header image, depending upon which domain name the user has visited.

    So, http://theatrelawyer.com would display an image related to theatre, and http://lawyer4films.com would display an image related to film, etc.

    Is this possible?

  19. 19
    James

    Thanks for the plugin. I’m not skilled with PHP, but I have tried a dozen ways to get a post thumbnail to show up next to the post title in the sidebar widget. I’m sure this is possible, but not with my skillset. Any tips on how to do this?

Leave Your Own Reply:



Improve the web with Nofollow Reciprocity.