Title: wp_tag_cloud
Last modified: August 20, 2016

---

# wp_tag_cloud

 *  Resolved [nitm](https://wordpress.org/support/users/nitm/)
 * (@nitm)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/wp_tag_cloud-2/)
 * Hi.
 * I’m trying to show the tag cloud in different ways:
    – when in index.php show
   all of the tags – when in category.php show tags of the category only (‘taxonomy’
   => ‘category’) – when in single.php show the tags of the current post only
 * What I get now is that in the category view it works as I want, in the other 
   two cases I see all the tags.
    From what I understand ‘taxonomy’ => ‘post_tag’
   should show just the tags in the current post, but from some reason it doesn’t
   filter.
 * What am I missing?
    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/wp_tag_cloud-2/#post-2313791)
 * I don’t have the answer to your actual question to hand but, in the single post,
   why not just use [the_tags()](http://codex.wordpress.org/Function_Reference/the_tags)?
 *  Thread Starter [nitm](https://wordpress.org/support/users/nitm/)
 * (@nitm)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/wp_tag_cloud-2/#post-2313793)
 * Because I want the “cloud” look where they have different sizes depending on 
   popularity and such, and from what I tested the_tags just outputs a list of them.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/wp_tag_cloud-2/#post-2313796)
 * Ah – now I understand! You’re using [wp_tag_cloud](http://codex.wordpress.org/Function_Reference/wp_tag_cloud),
   yes. If so, I think you’ve misunderstood the taxonomy attribute.
 * By `post_tags`, it refers to the **taxonomy type** `post_tags` – not the tags
   for this post. The taxonomy attribute has been added so that people can have 
   a cloud of category links (‘taxonomy’ => ‘category’) or blogroll links ((‘taxonomy’
   => ‘link_category’) or a completely new custom taxonomy. In each case, the displayed
   cloud will be generated from **all ** of the relevant types (categories, links
   etc) even when on a single post page.
 * Does that help at all?
 *  Thread Starter [nitm](https://wordpress.org/support/users/nitm/)
 * (@nitm)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/wp_tag_cloud-2/#post-2313798)
 * I was guessing that the whole taxonomy thing is escaping me..
    So, there’s no
   way to display just the tags added to the single post in a cloud style other 
   than implementing it myself?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/wp_tag_cloud-2/#post-2313804)
 * possibly:
 *     ```
       <?php if( is_single() ) :
       $tags = implode(',',wp_get_post_tags($post->ID,array('fields'=>'ids')));
       wp_tag_cloud('include='.$tags);
       endif;
       ?>
       ```
   
 * [http://codex.wordpress.org/Function_Reference/wp_get_post_tags](http://codex.wordpress.org/Function_Reference/wp_get_post_tags)
   
   [http://codex.wordpress.org/Function_Reference/wp_tag_cloud](http://codex.wordpress.org/Function_Reference/wp_tag_cloud)
 *  Thread Starter [nitm](https://wordpress.org/support/users/nitm/)
 * (@nitm)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/wp_tag_cloud-2/#post-2313815)
 * yes!
    exactly what I wanted. thanks a lot.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘wp_tag_cloud’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [nitm](https://wordpress.org/support/users/nitm/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/wp_tag_cloud-2/#post-2313815)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
