Create A Page That Lists All Tags That You Use on A WordPress Site

Create the file all-tags.php in the theme folder suffusion:

<?php
/**
 * Template Name: All Tags
 *
 * @package Suffusion
 * @subpackage Templates
 */

get_header();
?>
<div id="main-col">
  <?php suffusion_page_navigation(); ?>
  <?php suffusion_before_begin_content(); ?>
  <div id="content">

    <div <?php post_class('fix'); ?> id="post-<?php the_ID(); ?>">
      <?php suffusion_after_begin_post(); ?>
      <div class="entry-container fix">
        <div class="entry fix">
          <?php if (have_posts()) { the_post(); suffusion_content();} ?>

          <div style="width: 50%; float: left;">
            <h3>All <?php if (function_exists('tagstats')) { tagstats(); } ?> tags in alphabetical order:</h3>
            <?php wp_tag_cloud('smallest=10&largest=10&number=0&format=list'); ?>
          </div>

          <div style="width: 50%; float: right;">
            <h3>Most common tags:</h3>
            <?php wp_tag_cloud('number=50&format=list&orderby=count&order=DESC'); ?>

            <h3>Random remix tag cloud:</h3>
            <?php wp_tag_cloud('number=50&format=list&order=RAND'); ?>
          </div>

        </div>
        <?php suffusion_after_content(); ?>
      </div>
      <?php suffusion_before_end_post(); ?>
      <?php comments_template(); ?>
    </div>

  </div>
</div>
<?php get_footer(); ?>

Now you can create a new Page in WordPress and select the page template "All Tags".

If you want to use the all tags page with your theme, just copy the page.php file in your theme folder to all-tags.php and change it. The most important part to embedd is:

          <div style="width: 50%; float: left;">
            <h3>All <?php if (function_exists('tagstats')) { tagstats(); } ?> tags in alphabetical order:</h3>
            <?php wp_tag_cloud('smallest=10&largest=10&number=0&format=list'); ?>
          </div>

          <div style="width: 50%; float: right;">
            <h3>Most common tags:</h3>
            <?php wp_tag_cloud('number=50&format=list&orderby=count&order=DESC'); ?>

            <h3>Random remix tag cloud:</h3>
            <?php wp_tag_cloud('number=50&format=list&order=RAND'); ?>
          </div>

resources

Comments