Forums

Tag Cloud on Category Page (4 posts)

  1. hearkening
    Member
    Posted 2 years ago #

    Ok here's the challenge.

    I want to display a tag cloud on category pages.

    So for a given category, I want to show a tag cloud of tags that posts within that category have. I'm not looking to show a tag cloud of tags for posts within a certain category on another page, but rather on a category page itself.

    The concerns are filtering out duplicates, not relying on some crazy intensive queries, and making it so I don't have to make more than one category.php file.

    So, who's got ideas!? :)

    PS:

    • There are already posts about this, I know. They're all pretty unhelpful. They're more theories or using too many queries or focussed on displaying the list of tags on a non-category page.
    • There is a plugin that helps with this, I know. http://wordpress.org/extend/plugins/tdo-tag-fixes/ But I don't want to do it with a plugin -- too bloated.
  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Since you don't want a plugin, then take apart that plugin you listed or http://wordpress.org/extend/plugins/configurable-tag-cloud-widget/ and use that for ideas.

  3. MichaelH
    Volunteer
    Posted 2 years ago #

    Just learned you can also do this:

    <?php
    wp_tag_cloud( array( 'taxonomy' => 'category' ) );
    ?>
  4. ben.blodgett
    Member
    Posted 2 years ago #

    <?php wp_tag_cloud('smallest=8&largest=22'); ?>

    I have always used this replace the numbers with font sizes you want to use, heres a list of all the arguments available -\http://codex.wordpress.org/Template_Tags/wp_tag_cloud

Topic Closed

This topic has been closed to new replies.

About this Topic