Version 9.11 of the Advanced Sidebar Menu plugin is now available and ready for general use.
This version brings support for ordering categories and pages by their custom title as well as resolving edge case bugs and collisions.
Table Of Contents
Ordering Links By Custom Titles
Both category and page menu support setting a custom title for links in the menus. A custom title allows you to customize the display in the menus wherever the category or page is displayed. This has always worked fine when using an order by like “Page Order” or “Created” but could have unexpected results when ordering by “Page Order” or “Name.”
Ordering has always been handled within the WordPress queries using database table columns. Using this default way of ordering ensures proper caching as well as optimal performance. The downside to table columns is the custom titles are stored as meta values which cannot be used in these queries with heavy performance penalties. As we take the performance of our plugins very seriously, we were not willing to support custom title ordering until we had a super lightweight solution.
Using minimal meta value retrieval and ordering using PHP, we have developed a solution which is not only functional but also performant. The plugin will now consider custom titles when ordering both category and page menus by “Title” or “Name.”
Resolving Bugs and Collisions
Fix default ordering for categories
The default order by for category has always been “Created” which orders by a category’s term_id. Somewhere along the way Gutenberg changed the way selects are rendered which caused the first item to display if the default value is ”. Even though the categories were being ordered by “Created” the “Name” option was showing on new menus.
Display of the default option has been resolved to now display the correct “Created” by default.
Fix collision between custom category link title and show post counts
From the beginning of the Show post counts option on category menus, a subtle collision existed when a custom title is used. The value of the custom title would override everything in the link including the count.
The collision has been resolved so now custom title will display correctly along with post counts where applicable.
Miscellaneous
- Officially added support for PHP 8.5.
- Tested to WP core version 6.9.4.
- Required basic version 9.8.0+.
- Switched all uses of
WidgetWithIdinterface toWidgetin PRO version. - Improved labeling and help description of custom titles on categories.