How to Display Most Popular Tags in WordPress

Do you have a bunch of “most searched” and “liked” tags on your WordPress site? If the answer is yes, you must be looking for something that can help you showcase the most popular tags of your website to your target audience, such as in a “tag cloud”. In this article, we will show you some easy to follow steps that can help you display your most popular tags on the site. However, before we start discussing the various methods of popular tag display, let’s review some basics about “Tags” in WordPress.

When and Why You Need to Display the Most Popular Tags on a WordPress site

Tags and categories are the two basic taxonomies that help you sort your website content in separate groups. For wider sections, sub-menus and topics on your site categories are preferable. However, tags help you to classify the content.

For beginners, sometimes it becomes difficult to use tags and categories correctly, but there are many tools available online, which allows them to merge and even convert categories and tags according to their convenience.

Once you are clear on the concept of tags and categories, and you start using them correctly, you are more likely to have more tags on your WordPress site than category. As categories have a broader scope, you can easily adjust them in navigation menus. However, your tags often get less exposure and remain less explored.

To deal with this issue, you can add the default tag cloud widget to your WordPress site, by navigating to Appearance >> Widgets page. Here, you can add the Tag cloud widget to your site’s sidebar.

However, the default tags widget can only show all of your site tags alphabetically. There is no way you can rearrange the sequence or limit the number of tags displayed on the site. You can resolve this issue by selecting the most often used or most popular tags on your WordPress site. This way you can help your users quickly understand what topics on your site are mostly discussed.

Also, this will give them a path to discover more useful content, which will eventually result in higher user engagement and page views. Let’s have a look at the methods to display your most popular tags in WordPress easily.

Using a Plugin to Display Your Most Popular Tags in WordPress

This is one of the most recommended methods to display your most popular tags easily. To start with, you need to install and activate the Simple Tags plugin.

Once the plugin in activated, go to the Appearance >> Widgets page and place the Tag Cloud or Simple Tags widget to your site’s sidebar.

After adding the widget to the sidebar, the widget space will expand and here you can make changes in the settings. You can select the tags that you would like to display in the configuration section. You can also make changes in the font size and colours as per your requirements.

To show your tags as per the popularity rate, select the count for “Order by for display tags” and make adjustments in descending in “Order for display tags” options.

Make sure you do not forget to click the “Save” button to store all your widget settings safely. Once you are done with the configuration, you can go online to your WordPress site and see the popular tags live.

Display Popular Tags Manually in WordPress

To display the most popular tags of your site manually, you need to add code in your WordPress website’s theme files. Before beginning, save a copy of your theme’s functions.php file prior to editing it, just in case.

Next, copy the below-mentioned code and add this to your WordPress Theme’s functions.php file.

function wpb_tag_cloud() {

$tags = get_tags();

$args = array(
    'smallest'              => 10,
    'largest'                 => 22,
    'unit'                      => 'px',
    'number'                           => 10, 
    'format'                => 'flat',
    'separator'                        => " ",
    'orderby'                           => 'count',
    'order'                   => 'DESC',
    'show_count'                    => 1,
    'echo'                    => false
);

$tag_string = wp_generate_tag_cloud( $tags, $args );

return $tag_string;

}

// Add a shortcode so that we can use it in widgets, posts, and pages

add_shortcode('wpb_popular_tags', 'wpb_tag_cloud');

// Enable shortcode execution in text widget

add_filter ('widget_text', 'do_shortcode');

This code will automatically generate the top ten tags from your site in a cloud platform, with the number of posts associated with each tag. This will create a shortcode and enable the same in a text widget. Your shortcode will look like this:

[Wpb_popular_tags]

To display your most popular tags, enter the shortcode above exactly as it appears (including the square brackets) in any post, page or widget.

There are times when we land into problems just because of incorrectly copy-pasting codes. Ensure to correctly copy the above code. Make sure whenever you are adding any code to the function.php file, you follow the instructions carefully. In case any plugin is involved, ensure that the plugin is activated. These simple measures can help you escape big disasters.

Best Premium Tag Cloud Plugin

Extended Tags Widget

If you’d like more control over your tag cloud, consider springing for the premium Extended Tags Widget. It replaces the default WordPress Tag Cloud widget, and extends it with over 20 ways to fine tune the display and use of your tags.

Customize your widget’s background image, use an icon for the widget title (good for branding), and try one the 20+ built in tag styles. With a five star rating, low price point, the top downloads for the category, and a seasoned developer offering ongoing support, we recommend Extended Tags Widget for the best control over your Tag Cloud.

More Info & Download Plugin

 

 

 

How to Display Most Popular Tags in WordPress
5 (100%) 1 vote

Know Everything About WordPress
Best Products in Your Inbox

Subscribe to our mailing list and we will surprise you with amazing WordPress freebies

Jupitar Theme

Know Everything About WordPress
Best Products in Your Inbox

Subscribe to our mailing list and we will surprise you with amazing WordPress freebies