Previously I created an article about listing all WordPress tags on a single page however some things have changed since that time. When going back and looking at the article it looks like some of the tags have changed since that time. I do have a WordPress plugin installed called Simple Tags so take that into account when using the below directions. This plugin is recommended to provide you more control over your tags. The easiest way to display all tags is to create a blank WP page and assign a template to it that specifically lists all tags. Follow the below instructions and you will have a page listing all of your tags in no time at all.
- Add a Template Page:Add a new page called tag-cloud.php to your server in the theme directory of your WordPress installation. The location of the new file will be wordpress-root/wp-content/themes/theme-name/. You can copy the contents of the page.php file from the default theme or your theme and then make the following two modifications.First add the following to the top of the file just below the first <?php tag:
- Template Name: Tag Cloud Template
Second modify the below:php
- <?php the_content('<p class="serif">Read the rest of this page &amp;amp;amp;raquo;</p>'); ?>
- <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
- // the content itself
- the_content();// if wp supports tags
- if (function_exists('wp_tag_cloud'))
This will list all of your tags with the smallest font being 8 and the largest font being 16. More on the actual options below.
- Create New WordPress Page: Login to your WordPress admin, expand Pages in the left navigation menu, and then select Add New from the drop down menu. Name the page whatever you like but something like Tags is probably the right choice. Now modify the Template setting in the right column of this new page by selecting Tag Cloud Template from the drop down. Now publish the page.
To modify the display check out the WordPress Codex page about wp_tag_cloud.