WordPress.org

Ready to get started?Download WordPress

Forums

How to show posts from current category in a widget. (5 posts)

  1. blogseolady
    Member
    Posted 4 months ago #

    Hello. This is something I've been wanting to do for a long time but haven't found an exact command for.

    Say I have a post in category "Slow Cooker Recipes." I want to put a widget on the sidebar that shows other posts in that same category. Then say there's a post in category "Vegan Recipes." I want the widget to display other posts in its category.

    What code do I use? I know I will need a plugin to enable PHP coding in the widget. But what code do I use in it?

  2. alchymyth
    The Sweeper & Moderator
    Posted 4 months ago #

  3. blogseolady
    Member
    Posted 4 months ago #

    Thanks. I was looking for a solution that doesn't require a plugin. I already have a plugin that does that, but I'm looking to reduce the number of plugins I use. Am searching the posts now, but I don't see a clear solution. Still looking.

  4. alchymyth
    The Sweeper & Moderator
    Posted 4 months ago #

  5. blogseolady
    Member
    Posted 4 months ago #

    Thank you, alchymyth! I will use a WordPress code widget to apply a query based on the category's post. I will use those references you link to! I'll post it if I'm able to make it work. I know there are plugins that do it, but I try to keep my plugins at a minimum.

Reply

You must log in to post.

About this Topic