Walker News

How To Add Tag Cloud And Post Tag In WordPress Theme

Prior to WordPress 2.3, there is not built-in support for Tag Cloud and Post Tag features.

Thus, WordPress themes that were developed before the release 2.3 are not capable of showing Tag Cloud and Post Tag.

Even if you’re using the latest theme, the tag features might be “invisible” too.

To make this happen, you’ll have to ensure these two criteria exists in your weblog:
  • Install/upgrade to WordPress 2.3 or higher (supposedly the Tag feature will not be removed in future)
  • Update the WordPress theme template files by adding two new functions that are coded to display Tag Cloud and Post Tag

How to add the WordPress tag functions to existing WordPress theme?
The WordPress 2.3 comes with 2 themes – the classic and the default theme. However, not many users are using these “simple” themes and many tend to ignore them altogether!

In fact, they are worth to serve as a reference for WordPress theme developers. For example, the single.php template file calls the_tags WordPress function to display Post Tag in the post page.

Depends on where you want the Post Tag appears, edit the WordPress theme template file (normally this is single.php) and insert this single PHP code to show Post Tag
<?php the_tags( '<p>Tags: ', ', ', '</p>'); ?>

To display Tag Cloud, edit the WordPress theme template file (usually it is sidebar.php if the sidebar is more than 200px) and add this single line of PHP code
<?php wp_tag_cloud('smallest=8&largest=22'); ?>

WordPress function reference: |

Also refer How to setup multiple websites or hosts in single Apache web server

Custom Search

  1. Cloud5trike 11-10-09@21:12

    Thanks you. Your solution help me to add tag cloud into Notepad chaos themes

    But do you know how to add other widget :(

2017  •  Privacy Policy