How to Display Most Popular Tags in WordPress (2 Easy Methods)

0
27

Do you need to show the most well-liked tags used in your WordPress web site?

Tags and classes are the 2 default ways in which you should use to type your content material in WordPress. However, classes usually appeal to extra consideration due to their broader scope, leaving tags with much less publicity.

In this text, we are going to present you ways to simply show your hottest tags in WordPress.

Display Most Popular Tags in WordPressDisplay Most Popular Tags in WordPress

Categories and tags are the 2 default taxonomies used to type your articles in WordPress. Categories are used for broader matters or sections in your web site, whereas tags are well-suited to particular concepts throughout the context of your articles.

For instance, you may use the ‘travel’ class for all of your travel-related weblog posts, with tags like ‘Europe’, ‘Asia’, and ‘South America’.

Once you begin utilizing classes and tags appropriately, you’ll probably have extra tags in your web site than classes. Due to their broader scope, you may put categories in navigation menus, however your tags might stay much less explored by your guests.

One means to show tags in your web site is by including the default Tag Cloud block by visiting the Appearance » Widgets web page.

tag cloud blocktag cloud block

However, you’ll discover that this block will present all of your tags alphabetically. You can not rearrange their order or restrict the variety of tags which are displayed.

You can clear up this by displaying the most well-liked or most frequently used tags in your WordPress blog. This will enable your customers to shortly get an concept of the continuously mentioned matters in your web site. It may also assist them uncover extra content material, which implies extra web page views and person engagement.

Additionally, this will improve your website SEO as a result of tags can provide serps a greater understanding of the matters your web site covers, serving to your content material rank greater.

Having mentioned that, let’s check out how to simply show your hottest tags in WordPress. We will cowl completely different strategies, and you should use the short hyperlinks under to leap to the one you need to use:

If you need to use a plugin to show the most well-liked tags in your web site, then this methodology is for you.

First, you want to set up and activate the TaxoPress plugin. For detailed directions, you might have considered trying to see our step-by-step information on how to install a WordPress plugin.

Upon activation, go to the TaxoPress » Terms Display web page from the WordPress dashboard. Here, you want to click on on the ‘Edit’ hyperlink below the ‘Terms Display’ choice.

Click the Edit link under the terms display optionClick the Edit link under the terms display option

This will open a brand new web page on the display, the place you can begin by selecting a title for displaying tags. After that, ensure that the ‘Tags’ choice is chosen in the ‘Taxonomy’ dropdown menu.

Then, you may choose for those who solely need to show tags which are used in your pages, posts, or media individually. Alternatively, you may show well-liked tags for all of the submit sorts.

We suggest utilizing the ‘Posts’ choice. This will robotically remove any tags that you’ve got used to your pages or photographs.

Choose tags as the taxonomyChoose tags as the taxonomy

Next, change to the ‘General’ tab from the left column and select the ‘Counter’ choice from the ‘Method for choosing terms from the database’ dropdown menu.

Next, merely choose the ‘Descending’ choice from the ‘Ordering for choosing term from the database’ menu.

Once you try this, you could choose the ‘Counter’ choice once more from the ‘Method for choosing terms for display’ dropdown menu and the ‘Descending’ choice from the ‘Ordering for choosing terms for display’ dropdown menu.

Now, solely the most well-liked tags in your WordPress web site shall be displayed.

Choose the Counter and Descending options to display most popular tagsChoose the Counter and Descending options to display most popular tags

Once you try this, change to the ‘Options’ tab from the sidebar.

Here, you may add any textual content that you really want to show earlier than or after your listing of well-liked tags.

Add text that you want to be displayed before and after your list of tagsAdd text that you want to be displayed before and after your list of tags

After that, change to the ‘Design’ tab and select the utmost variety of well-liked tags to show in your web site.

You also can select a font dimension and colours to your tags. Then, go forward and click on the ‘Save Terms Display’ button on the best.

Click Save Terms display buttonClick Save Terms display button

Add Popular Tags to the WordPress Sidebar

Now, head to the Appearance » Widgets web page from the WordPress admin sidebar and click on the ‘Add Block’ (+) button.

Note: If you might be utilizing a block theme, then this methodology received’t work as a result of the TaxoPress plugin doesn’t provide the ‘Terms Display’ block in the complete web site editor. In this case, you should use our second methodology.

This will open the block menu, the place you may add the Terms Display block to your web site sidebar.

Once you try this, simply choose the time period show that you just created to your tags from the dropdown menu throughout the block itself.

Add the terms display block in the WordPress sidebarAdd the terms display block in the WordPress sidebar

Finally, click on the ‘Update’ button on the prime to retailer your settings.

Now, you may go to your WordPress web site to view the listing of well-liked tags in motion.

Popular tags previewPopular tags preview

If you might be utilizing a block theme or favor to use code, then this methodology is for you.

You can show the most well-liked tags in WordPress by including customized code to your theme’s functions.php file. However, the smallest error when typing the code could make your web site inaccessible.

That is why we suggest utilizing WPCode. It is the perfect WordPress code snippets plugin available on the market that makes it protected and simple to add code to your web site.

First, you want to set up and activate the WPCode plugin. For extra info, see our newbie’s information on how to install a WordPress plugin.

Note: WPCode has a free plan that you should use for this tutorial. However, upgrading to the paid plan will unlock extra options like conditional logic, CSS snippets, a code snippets cloud library, and extra.

Upon activation, head to the Code Snippets » + Add Snippet web page from the WordPress dashboard.

Here, click on the ‘Use Snippet’ button below the ‘Add Your Custom Code (New Snippet)’ choice.

Add new snippetAdd new snippet

This will direct you to the ‘Create Custom Snippet’ web page, the place you can begin by including a reputation for the snippet.

Next, select the ‘PHP Snippet’ choice because the Code Type from the dropdown menu on the best.

Choose PHP Snippet for the code snippet to display popular tagsChoose PHP Snippet for the code snippet to display popular tags

After that, copy and paste the next customized code into the ‘Code Preview’ field:

perform wpb_tag_cloud() {
$tags = get_tags();
$args = array(
    'smallest'                  => 10,
    'largest'                   => 22,
    'unit'                      => 'px',
    'quantity'                    => 10,
    'format'                    => 'flat',
    'separator'                 => " ",
    'orderby'                   => 'depend',
    'order'                     => 'DESC',
    'show_count'                => 1,
    'echo'                      => false
); 
 
$tag_string = wp_generate_tag_cloud( $tags, $args );
 
return $tag_string; 
 
}
// Add a shortcode in order that we are able to use it in widgets, posts, and pages
add_shortcode('wpb_popular_tags', 'wpb_tag_cloud'); 
 
// Enable shortcode execution in textual content widget
add_filter ('widget_text', 'do_shortcode');

This code merely generates the highest 10 tags out of your web site in a cloud with the variety of posts in every tag. After that, it creates a shortcode wpb_popular_tags and enables a shortcode in the text widget.

Now, you will have to scroll down to the ‘Insertion’ part and select the ‘Auto Insert’ mode. The code shall be robotically executed when you add the built-in shortcode to your web site.

Choose an insertion methodChoose an insertion method

Once you try this, scroll again to the highest and toggle the ‘Inactive’ change to ‘Active’.

Finally, click on the ‘Save Snippet’ button to retailer your settings.

Save the code snippet for displaying popular tagsSave the code snippet for displaying popular tags

Add Most Popular Tags in the WordPress Full Site Editor

If you might be utilizing a block theme, then head to the Appearance » Editor web page from the WordPress dashboard.

This will open the complete web site editor, the place you will have to click on the ‘+’ button to open the block menu. From right here, add the Shortcode block to the web page.

Next, you could add the next shortcode to the block itself:

[wpb_popular_tags]

Finally, click on the ‘Save’ button on the prime to retailer your settings.

Now, simply go to your web site to see the favored tags in motion.

Popular tags preview in a block themePopular tags preview in a block theme

Add Most Popular Tags in the WordPress Widget Area

If you might be utilizing a traditional theme in your web site, then you may add well-liked tags by visiting the Appearance » Widgets web page from the WordPress dashboard.

Here, click on the ‘Add Block’ (+) button to open the block menu and add the Shortcode block to your most popular widget space.

Next, add the next shortcode into the block:

[wpb_popular_tags]

Add shortcode in the widget area of your likingAdd shortcode in the widget area of your liking

Then, click on the ‘Update’ button to retailer your settings.

Now, go forward and go to your WordPress web site to see the favored tags.

Preview of the popular tagsPreview of the popular tags

Bonus: Style the Tags on Your WordPress Website

Now that you’ve got added the most well-liked tags to your WordPress website, additionally it is vital to customise them for the theme that you’re utilizing. This will make your tags visually interesting and assist seize the person’s consideration instantly.

Plus, by utilizing completely different sizes, fonts, and colours to your tags, you make it simpler for guests to scan and discover the tags they’re in. This might help improve engagement and click-through charges.

For instance, if a person is just in studying about your articles associated to journey, then they’ll click on on that tag to open a listing of travel-related articles.

Styled tags previewStyled tags preview

You can fashion your tags by adding custom CSS to change the spacing between them, add background colours, change the alignment, and way more.

For detailed directions, you may see our newbie’s information on how to style tags in WordPress.

We hope this text helped you learn the way to show the most well-liked tags in WordPress. You might also need to see our newbie’s information on categories vs. tags – SEO best practices for sorting your content and our listing of most wanted WordPress tips, tricks, and hacks for inexperienced persons.

If you favored this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You also can discover us on Twitter and Facebook.



Source link