Advanced Sidebar – Categories
The categories widget and block supports all options available in the basic version as well as these additional options.
Order By
Order the categories by:
- Name – Category titles (default order).
- Created – Order in which categories were created.
- Count – Number of posts assigned to the category.
- Slug – The category’s slug.
Order
Ascending or Descending.
Display assigned posts under
If this option is selected, posts which are assigned to the selected levels of categories will display in the menu. You may select any of these levels to display:
- none – Displays no posts, this is default.
- all categories – Displays assigned posts under every level.
- highest level parents – Displays assigned posts under the highest level parents only.
- highest level parents and children – Displays assigned posts under the highest level parents and the first level of children.
- children and grandchildren – Displays assigned posts under the child categories and all levels of grandchild categories.
- grandchildren – Displays assigned posts under all levels of grandchild categories only.
Post Type
Works in conjunction with “Display assigned posts under” to allow selecting another post type which is assigned to categories or the taxonomy selected in the widget. Note: the list of available post types changes based on which taxonomy you have selected and may require hitting save on the widget to update.
Display <number> posts
Works in conjunction with “Display assigned posts” to allow limiting the number of posts which will show up under each category. You may also select –All– to display up to 100 posts.
Display widget on every page
This option allows you to select a top-level category to use when generating the menu. Any page on your site which displays this sidebar will display the widget with the same menu as all other pages. This is useful for adding menus to locations such as a homepage or shop page. For more control, there are many WordPress plugins available in the community which allow setting which widgets or sidebars appear on which pages. If you have this option checked, the widget will honor any widget/sidebar location settings created with other WordPress plugins.
Highest level parent category
Works in conjunction with “Display widget on every page” to allow selecting of the top level category to use when displaying the menu. You may also select “All” to display all top-level categories.
Taxonomy
If you have any hierarchical taxonomies registered there will be an option to select which taxonomy you would like displayed in the widget (a common use for this is to display WooCommerce Product Categories). Defaults to Categories. If you have not registered any custom taxonomies, this option will not display.
Show post counts
Checking this box will display the count of posts assigned to each category next to the category title. The counts will look something like this (10).
The category title and count are separated by HTML
<span>
to allow fine tuned styles using custom CSS.
Enable accordion menu
Checking this box will enable accordion functionality for this widget as well as open additional accordion settings.
Click to show styles
Clicking this button will open the style settings which allows you to style the various levels of your menu.