WordPress has few default widgets and one of them is tag cloud widget. By default, this widget allows you to creatively display your 20 top tags. This widget is highly customizeable and these are all parameters can be accepted by the widget.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
As you can see on line 19, we can specify the taxonomy to be displayed on the cloud widget. To display custom taxonomies on this widget, simply replace post_tag
with your custom taxonomies name. Here’s a working code that can be placed on your child theme’s functions.php
file:
1 2 3 4 5 6 7 8 9 10 |
|
Don’t forget to replace mycustom_tax
with your custom taxonomies name. That’s all you need to do, it couldn’t be much simpler than that. We hope this tutorial helped you to display custom taxonomies on the tag cloud widget. Don’t forget to check out our article on customizing WordPress tag cloud widget for more examples on customizing the widget. For more info about WordPress tag cloud widget, be sure to check out WordPress Codex.
Leave a Reply