Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBrandon Brigham
3,716 PointsAnybody know how to create a category cloud in wordpress? Or know of a plugin?
I'm trying to show a category cloud on my blog page (similar to a tag cloud but for categories)
Is there a way to do this manually? Or does anyone know of a plugin that is current and that works?
Thanks!
2 Answers
Sue Dough
35,800 PointsThe other poster was close. You can pass in some arguments to wp_tag_cloud to make it work for categories. This is what you are looking for.
<?php wp_tag_cloud( array( 'taxonomy' => 'category' ) ); ?>
Source: https://codex.wordpress.org/Function_Reference/wp_tag_cloud#Display_a_Category_Cloud
Craig Watson
27,930 PointsHi Brandon,
You may find this page of the codex codex useful. wp_tag_cloud, if you need help implementing this let me know :)
Craig
Brandon Brigham
3,716 PointsHi Craig -
Thanks for info - I'm looking for something with categories though and not tags - Not sure if this is even possible....
Craig Watson
27,930 PointsHi Brandon,
That page of the docs explains that the cloud can be used to show categories. As Sue Dough has shown, you simply update the taxonomy value in the array.
Craig
Brandon Brigham
3,716 PointsThanks Craig!
Brandon Brigham
3,716 PointsBrandon Brigham
3,716 PointsThanks Sue!