Display All Tags on One Page

Supplemental 1,680 views
+5
0 Flares 0 Flares ×

Note that this is just one basic way to do this. There are a few different ways to go about doing this and there is a lot more you can do to beef it up & customize it. But for the sake of simplicity this will get a basic all encompassing tags page.

Step 1 – Create Template

You need to make a new file within your theme directory named template-tags.php

This will need to be customized based on your theme. Specifically the div containing the content & or sidebar, etc.

<?php

/* Template Name: Tags Template */

get_header(); ?>

<div id="content">

   <h1>Tags</h1>
   <?php the_content(); ?>
   <?php wp_tag_cloud('format=list'); ?>	

</div>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

The key here is the wp_tag_cloud which is responsible for outputting all of the tags.

Step 2 – Add the CSS

.wp-tag-cloud {
	list-style-type:none;
	margin:0;
	padding:0;
}
.wp-tag-cloud li a {
	float:left;
	padding:5px 8px 5px 8px;
	background:#444;
	font-size:18px;
	color:#fff;
	margin:0 10px 10px 0;
	transition:500ms;
	-moz-transition:500ms;
	-webkit-transition:500ms;
}
.wp-tag-cloud li a:hover {
	background:#888;
}

Step 2 – Create a Page

Create a page named “Tags” and then select the “Tags Template” from the template drop-down menu (by default should be somewhere under the “Update” button on the right).

Complete!

Now you have a page that you can put in your menu or link to your sidebar that displays all your tags.

Posted in Wordpress

Discuss:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

No Trackbacks.

Login

Register | Lost your password?
0 Flares Twitter 0 Facebook 0 Google+ 0 0 Flares ×