If you use tags to sort your content in WordPress, then you’ll notice that you use some tags more than others. These represent the topics that you write the most about on your site. You can display these tags so that visitors and search engines know which topics your site has authority on. This can help boost your site’s rankings and ensure visitors easily find related content.

In this post, we’ll share how you can display your most popular tags with and without a plugin. Before we dive into these two methods, let’s look more closely at the benefits of adding tags to your site. 

Grow Your Business With HubSpot's Tools for WordPress Websites

Why display the most popular tags on your WordPress site?

Like categories, tags provide a simple way to organize posts in WordPress. While categories tend to be umbrella terms, tags are more specific. Both of these taxonomies can provide a better experience for your visitors and boost your site’s rankings if they’re based on keyword research. 

How? Categories and tags can be used to organize your site into topic clusters. The cluster signals to search engines that there is a breadth and depth of content, which gives your site more authority on the topic. 

Tags offer even more benefits to site visitors. Not only can tags save your visitors from scrolling through a feed of uncategorized posts, but they can also help those visitors quickly find relevant content. This will help increase the chances that they look at more of your posts and stay on your site longer. In other words, you’ll get more page views and a lower bounce rate. 

Before we walk through the methods for displaying your most popular tags, let’s first look at how you can display your tags using the built-in tag cloud widget in WordPress.

How to Display a Tag Cloud in WordPress

Unlike categories, you can’t place tags in your site’s navigation menu. You can, however, add a widget to display them as a tag cloud on your site. 

Example of tag cloud using the built-in widget in WordPressSource

To add a tag cloud, you go to Appearance > Widgets and drag and drop the Tag Cloud widget to your sidebar.

The problem is this widget has very limited functionality. It can only display all your tags alphabetically. There’s no option to rearrange tags or limit the number of tags that are displayed. This means if you have a lot of tags, this display can overwhelm rather than be helpful to your visitors.

To provide a better and more seamless experience for your visitors and maximize your SEO efforts, you’ll want to display only your most popular tags. To do that, you’ll need to manually add code to your theme’s functions.php file or use a plugin. Let’s walk through these two options below.

How to Display Your Most Popular Tags in WordPress Without a Plugin

If you’re worried about your site’s load time or are an advanced user in WordPress, then you may be looking to avoid a plugin to display your most popular tags. No sweat. You can manually display these tags in a few simple steps.

First, you’ll add the code below to your theme’s functions.php file between the PHP tags. The PHP tags look like this: <?php.....?>

 

 

   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 10 tags from your site in a cloud platform with the number of posts associated with each tag in parentheses. You can then add the shortcode [wpb_popular_tags] in any post, page, or widget to display a tag cloud like the one shown below. 

Adding code to your theme's function.php file will display the top 10 tags from your site in a cloud platform with the number of posts associated with each tag in parentheses

Source

How to Display Your Most Popular Tags in WordPress With a Plugin

If you’d prefer to avoid code altogether, you can use a plugin to easily display and manage your most popular tags. Below we’ll look at two plugins so you can choose the one that best meets your needs. 

Simple Tags

Simple Tags is a free plugin that can help you display and manage tags in WordPress.

To improve the appearance and functionality of your tag cloud, this plugin provides you the option of ordering your tags by popularity. You can also customize the number of tags to display as well as the font size and color. 

The Simple tags plugin provides options to order your tags by popularity and customize their appearance Source

This plugin can also help simplify your tag management responsibility. You can easily rename, delete, merge, search, add, and edit tags in your cloud. You can also use the auto tags feature, which will automatically tag posts that contain the keyword, so you don’t have to manually tag them.

Extended Tags Widget

Extended Tags Widget is a premium plugin that offers more functionality and customization options for displaying and managing your WordPress tags. 

Replacing the default Tag Cloud widget, this plugin offers over 20 styles for your tags. You can then organize them by name or count, in any order. Below are a few examples. 

Using the Extended Tags Widget, you can display your tags by popularity or 20 other styles

Source

You can also specify how many tags are to be displayed as well as include or exclude specific tags. In short, if you want complete control over tagging your posts, then this plugin is for you. 

Tags can help you achieve your goal of creating a site that’s easy for visitors to navigate and quickly and effectively delivers the information they need. You can display your tags manually or download one of the above-mentioned plugins to display your most popular tags in no time.

Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

 Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

Originally published Oct 25, 2019 11:57:51 AM, updated September 01 2021

Topics:

WordPress Website