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.

Anyone know if it's possible to create something similar to the wordpress built in tag cloud (wp_tag_cloud) but instead of displaying tags, display custom post types?

Thanks

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

How about the wp_generate_tag_cloud() function? You'll need to feed it $tags, which is an array of objects with the link and term_id, set something like this.

$tags[]->link = $link;
$tags[]->id = $tag->term_id;

The term_id will only be used in the CSS...so don't sweat that too much.

share|improve this answer
add comment

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.