Search
  • Software by
  • Christoph Amthor
  • Software von
  • Christoph Amthor
Search Menu

Tag Groups, Version 0.27: Natural Sorting And Bug Fixes

The main new feature of this release is the possibility to use natural sorting for tag names. You apply it with the shortcode parameter “orderby” and the value “natural”, instead of “name”. The entire shortcode could look like this:

[tag_groups_cloud orderby="natural"]

Sorting Numbers

So what does “natural sorting” actually mean? Natural sort order is a more intuitive order of names that contain numbers of various digits. For example, you usually sort 2 before 11 because you fill up all empty digits on the left with zeros: 02 is compared with 11, and obviously 0 is less than 1. Usual sorting, as done by the WordPress database machine, however, just compares all characters from left to right as they appear. 2 is greater than 1, and therefore 2 would be sorted behind 11, resulting in lists like this:

name1
name11
name12
name2
name21

With natural sorting, however, you get this:

name1
name2
name11
name12
name21

WordPress always uses natural sort order for its default tag cloud function (and widget) whenever you sort by “name”. I decided to keep “name” as “machine sort order”, since it’s not good practice to change the (intended) behaviour of a parameter with an update. Some users might simply want the order not to be “natural”.

Get the latest release from WordPress or through your automatic plugin updater, or read more about available shortcode parameters.

The new option will also appear in the shortcode of the premium plugin.

Photo by wojciechowskaek5

Share
  • 2
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Check Out My Plugins:

Organize your tags in coherent groups and tidy up your tag cloud! Display your tags under tabs or in an accordion.

You will never want to go back to the times when your tags were all over the place.

FREE

Supercharge your tags! Tag your posts on two levels with tag groups. Filter your posts on the frontend. Let your visitors search in real time by tags and groups.

Go directly to your first, latest or a random post just by adding some magic words to your site's URL. Search posts by author, or category, or something else. Or combine a time frame with search parameters.

FREE
Updated: 2017-11-23T22:49:47+00:00

Leave a Comment

Required fields are marked *.