Widgets »Categories Widget
The Categories Widget organizes your posts by category in your blog’s sidebar. This can be handy for readers who want to find more of your posts about certain topics.
Here’s what it looks like when it’s activated on a blog sidebar:
Note: Only categories that are attached to posts will be displayed in the widget.
Once you add the widget to your sidebar from Appearance → Widgets, you’ll see that the widget settings look like this:
Title – Sets the title that will display above the categories in the sidebar. (i.e. Categories)
Show as dropdown – Check this box to display the categories in a drop down menu rather than as a list. This is handy if you want to save space or have a lot of categories.
Show post counts – If this box is checked, the the total number of published posts for that particular category will be displayed next to the link. You can show post counts with both the list and dropdown menu formats.
Show hierarchy – If you have parent and child categories (subcategories within main categories) you can choose to display the hierarchy (pictured below) or just leave the list “flat,” without indicating which subcategories fit inside your main categories (pictured above). You can show category hierarchies with both the list and dropdown menu formats.
Changing Visibility is optional. It is an advanced option which allows you to choose when to show the entire category widget based on different factors. It will only appear in the sidebar for posts that fall in that category. It will stop appearing on all other pages that aren’t related to that category. For instance, if you blog about what you do during your free time and want the widget to only when looking at a single travel post or a category page of nothing but travel posts, set the visibility to “Show” if “category” is “travel” and click Save. Then the widget will stop showing on all other post pages, and only show if it is post from the travel category.
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"]