Using categories to filter posts in Recent Posts widget

  • Author
  • #1484861


    I have created 2 categories, Restoration Update and News, and have gone through all of my posts and added the appropriate category. I want my “Latest News” blog to show everything categorised to News and likewise Restoration Update.

    However, I seem to have all posts in both blogs.

    What am I doing wrong?

    The blog I need help with is


    You can do what you want by using one or two text widgets with the Display Posts Shortcode instead.

    If you want to instead limit the categories that show (and have the widget appear on all pages), consider using a Text widget and either writing out what you want your visitors to see or using the Display Posts Shortcode to automatically show only a certain number of posts of a specific category: [display-posts category="travel" posts_per_page="3"]

    (from Recent Posts Widget)



    Thank you. I have tried that but look what has happened on my home page at the bottom of the RH column. I have the right posts but the formatting is awry


    Ahh, I see what’s happening and it’s tied to your theme. The list output for that shortcode uses some css selectors that conflict with your theme’s .title tag.

    (i.e. code that your styles use for something else is applying here, because the shortcode uses the same name for it.)

    With this theme, you could solve this by using a Custom Design Upgrade to write a little bit of custom css that fixes the conflict.

    This would be a start to fix the weird formatting. You might want to style a bit further after that:

    .listing-item .title a { padding: 0; background: none; }

    Otherwise, you may want to look at trying a different theme. I tried your code in a few other themes and they displayed it nicely.



    Thanks very much lettergrade. I dont really want the hassle of changing my theme at this point so I have approached the problem differently.

    Thanks for your help


    Sure, best of luck.

The topic ‘Using categories to filter posts in Recent Posts widget’ is closed to new replies.