WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using this code: <?php wp_tag_cloud( array( 'taxonomy' => 'channels') );?> To display custom taxonomy as a cloud tag. How can display with all links being the same size? I can't seem to override the inline styles.

share|improve this question
up vote 2 down vote accepted

How about passing the smallest and largest arguments to wp_tag_cloud() and making them both the same?

        'taxonomy' => 'channels',
        'smallest' => '1',
        'largest' => '1',
        'unit' => 'em',

Update: use get_terms() to get multiple taxonomy terms:

<?php $terms = get_terms(array('channels', 'stations'));
if (is_array($terms)) : ?>
    <?php foreach ($terms as $term) : ?>
    <li><a href="<?php echo get_term_link($term) ?>"><?php echo $term->name ?></a></li>
    <?php endforeach; ?>
<?php endif; ?>
share|improve this answer
That worked like a charm. How could I adjust it to support a second taxonomy? I.E. Show the tags for channels and stations. – Sam Jun 23 '12 at 18:47
@Sam It's starting to sound like maybe you should use get_terms() instead of a tag cloud. I'll update my answer. – jessica Jun 23 '12 at 18:54
that worked! Thanks. – Sam Jun 23 '12 at 19:09

Strip the inline CSS with a filter on 'wp_tag_cloud':

add_filter( 'wp_tag_cloud', 'wpse_56312_clean_tag_cloud' );
function wpse_56312_clean_tag_cloud( $tags )
    return preg_replace( "~ style='[^\']*'~", '', $tags );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.