Version 9.1 of the Advanced Sidebar Menu plugin is now available and ready for general use.
This release focused on adding new features to the category menus and management.
Show Post Counts for Categories
The WordPress core’s categories list block includes support for showing the count of the posts assigned to each category in the menu. This “Show post counts” feature prompted users of our Categories menus to also request said feature.
In the past we have always directed our users to a filter which would enable support for posts count. Not any more! Now both the blocks and the widgets have a “Show post counts” checkbox for enabling the feature.
Because the count must live within the
<a> tag to allow the existing styles to function, we’ve separated the category title and count with separate
<span> tags. You may target the elements with your custom CSS using the following tags respectively.
New Category Edit Fields
Pages have pretty much always supported options to exclude a page from all menus or change the title of a page within the menu. Categories now support the same options.
From your category edit screen, you will find these new fields which support:
- Excluding a category from every Advanced Sidebar menu.
- Changing the title of a category in every Advanced Sidebar menu.
These settings also work on all supported custom taxonomies.
Improved Exclusions Caching
Each menu checks for excluded items when it renders. As we don’t want to run a possibly heavy query on each page load, we’ve always cached the excluded items using WordPress Object Cache.
Using object cache works great if your site is using an external object cache such as Memcached. If not, the object cache helps but the queries still run on every page load at least once. We have now expanded our caching strategy to use the WordPress Transients System.
For sites without an external object cache, the exclusions are now cached in the database and will perform much faster. For sites with an external object cache there will be no performance difference.
- Fixed translations in block fields which were broken by version 9.0.2.
- Deprecated the
Meta\Titleclass in favor of classes separated by context.
- Improved support for custom post types in navigation menus.