Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Brandon Brigham
Brandon Brigham
3,716 Points

How to have specific blog post categories show up in a sidebar in WordPress?

Hello guys,

In WordPress, how can I specify specific categories to be posted in the sidebar? I only want one category of my blog posts to show up in the sidebar. Thanks!

Konrad Pilch
Konrad Pilch
2,435 Points

HI, do you mean you have a blog post , and you want to show recent post that will only display one?

Brandon Brigham
Brandon Brigham
3,716 Points

No, I want to display a blog post with a specific category assigned to that blog post -

example:

I have a blog - the blog has two categories, A and B -

I want my home page sidebar to only display blog posts with category B chosen

2 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

If you want to code it yourself, check out our workshop on Custom Loops in WordPress.

Andrew Lima
Andrew Lima
5,233 Points

When in doubt find a plugin before anything else (chances are there is something already out there unless it's very specific). Hope this helps

https://wordpress.org/plugins/category-posts/

Konrad Pilch
Konrad Pilch
2,435 Points

Or maybe he wants to learn it how to code it itself :D Like me.