Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to modify the markup of the tag cloud widget.

Can someone tell me how to go about doing this without modifying any of the files outside of the theme directory so my changes don't get overwritten when updating WordPress?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

What sort of custom markup do you need? Can you elaborate a little more?

share|improve this answer
    
Rather than just have a bunch of anchors, I need to insert them into <li> tags and float the list items so there can several columns.I know I could apply this to the anchors, but I want those to be set to display: inline (since they're text links). –  user1462 Jan 19 '11 at 20:40
1  
<?php the_tags('<ul><li>','</li><li>','</li></ul>'); ?> –  Pippin Jan 19 '11 at 21:05
    
Then just float the li tags with CSS –  Pippin Jan 19 '11 at 21:06
    
@Pippin, thanks for the response. This appears to be code to insert for each post. I need to display a tag cloud in the sidebar that contains tags used in all posts. When I tried inserting your code, it didn't print any thing out. What needs to be changed in order for the_tags() to work in the sidebar? –  user1462 Jan 19 '11 at 21:40
1  
@Pippin, Nevermind, I figured out that wp_tag_cloud() needs to be used instead. Thanks! –  user1462 Jan 19 '11 at 21:45

If you're looking to change the way the tag cloud is displayed, you can use get_tags() to heavily alter the output and create a custom widget.

share|improve this answer

Your Answer

 
discard

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.