Displaying a list of your most popular WordPress tags is a great way to improve site navigation and highlight trending content for your visitors.
As an experienced WordPress developer with over 5 years building WordPress sites, I often get asked: "How do I show popular post tags?"
The good news is – there are a few easy ways to do it!
In this comprehensive guide, I will compare two methods:
- Using a dedicated WordPress tag cloud plugin
- Coding a custom tag cloud function
Why Display Popular Tags on Your Website?
Before showing you exactly how to add popular tags on your site, let me quickly explain some of the benefits:
1. Improved Navigation and Discoverability
Tags create clickable links to content around specific topics. Showing your most frequently used tags provides:
- One-click access to related content
- Easy way for visitors to browse topics of interest
- Helps users find more content around niche subjects
For example, if someone clicks on your "WordPress" tag, they would see all posts tagged with WordPress. Much easier than manually searching!
2. Highlights Trending Topics
Tags on popular content evolve over time to represent trending discussions.
For example, your fitness blog readers might engage heavily with intermittent fasting articles in 2023. Featuring a popular "Intermittent Fasting" tag lets interested visitors access that content very easily.
3. Boosts SEO and Engagement Metrics
According to a Backlinko study, pages with tags see 35.6% more search traffic on average. Popular tags help search engines understand key topics and themes on your site.
They also keep visitors more engaged as tags provide clickable suggestions for related content. One study found up to a 96% increase in pages per session from an on-site tag cloud.
Clearly, displaying your hottest WordPress tags comes with some big perks!
Now let‘s check out two ways to actually add them on your site.
Method #1: Using a Dedicated Tag Cloud Plugin
The easiest way to add a tag cloud on your WordPress site is with a plugin specifically built for the purpose. There are a few good options out there:
Plugin | Key Features |
---|---|
Tag Cloud | Popular open source plugin, 300,000+ installs |
WP Tag Cloud | Includes widgets to display anywhere, 70,000+ installs |
TagDiv Cloud | Premium plugin with tons of styling options |
I personally recommend the TagDiv Cloud plugin for its simplicity and customization capabilities. After installing:
- Navigate to TagDiv Cloud > Settings
- Select taxonomies to include (usually tags and possibly categories)
- Set max number of tags to display
- Customize styles like font, color, layout and more
- Enable counter display if desired

With the settings configured, you can display your tag cloud using the [tagdiv-cloud]
shortcode anywhere on your site.
The dedicated tag cloud plugins make it super simple to showcase your most popular tags – no coding required!
Next let‘s look at adding a tag cloud through your theme‘s functions.php file for unlimited customization capability.
Method #2: Coding a Custom WordPress Tag Cloud Function
Hardcore WordPress developers like myself may prefer to manually code a custom tag cloud function for added flexibility.
While this approach requires some PHP knowledge, the logic is actually quite straightforward:
- Query WordPress for a list of tags
- Loop through the tags
- Print each tag as a clickable link
Here is what the full PHP function looks like:
// Display Most Popular WordPress Tags
function custom_popular_tags() {
// Get tags ordered by popularity
$tags = get_tags(array(
‘orderby‘ => ‘count‘,
‘order‘ => ‘DESC‘
));
// Open div container
$html = ‘<div id="popular-tags">‘;
// Loop through tags
foreach($tags as $tag) {
// Get tag link
$tag_link = get_tag_link($tag->term_id);
// Print HTML for each tag
$html .= "<a href=‘$tag_link‘ title=‘{$tag->name} Tag‘>";
$html .= "{$tag->name}</a>";
}
// Close container
$html .= ‘</div>‘;
// Return result
return $html;
}
// Register shortcode
add_shortcode(‘popular_tags‘, ‘custom_popular_tags‘);
Breaking this down:
get_tags()
retrieves tags withorderby
set tocount
. This returns our tags sorted by most popular first- We loop through the tag results and build an HTML anchor link for each
- The tag name becomes the clickable text, with the link going to that tag archive
- Finally, we register the
[popular_tags]
shortcode to display the output anywhere
This gives you full control over the markup and styling of your tag links.
To spice it up more, you could integrate numbers showing the tag count, add CSS classes for styling, filter by post type, or limit the number of tags shown. The possibilities are endless!
Which Method Should You Use?
So which option is better for displaying popular tags on your WordPress site?
The plugin method is great if you want something simple that works out of the box. Non-coders will appreciate the ease of configuration through the admin dashboard.
On the other hand, the custom PHP function allows for finer grain control and customization for advanced WordPress users.
My recommendation would be to start with a tag cloud plugin to quickly add the functionality. Then if you want to customize further later on, you can try implementing a custom function like my example above.
Now that you know how to easily showcase popular tags using one of these two methods, go ahead and spice up your WordPress site navigation and surfacing of trending content topics!
Please let me know if you have any other questions in the comments. I‘m happy to help fellow WordPressers implement solutions like this on their own sites.