Aziz Ozbek
WordPress Expert from Zürich

WordPress get Tag Cloud by Shortcode

I was creating a WordPress Website and i needed use the most used Tags in the website. I wanted to show the tags somewhere in the Website after breadcrumbs.

WordPress has already a Widget called “Tag Cloud”. With this tool you can configure on the widget panel how many tags do you want to show on widget and customize the design. But you can use it only there, where you place the widget.

To use this widget anywhere in your website, you can assign this function with customized arguments into a shortcode.

Copy and paste following code block into your functions.php. Then you can use the shortcode grab_popular_tags anywhere in your website.

You can find the explanation of the parameters on the official wordpress site:

wp_tag_cloud()

You can also create your own tag cloud widget:

wp_generate_tag_cloud()

Rating: 5.0/5. From 1 vote.
Please wait...

Leave a Reply

Your email address will not be published. Required fields are marked *