WordPress.org

Ready to get started?Download WordPress

Forums

Display taxonomy as list instead of cloud (4 posts)

  1. trex33
    Member
    Posted 4 years ago #

    How can I display a new taxonomy as a list instead of a cloud?

    Justin Tadlock's excellent primer on taxonomies (Custom Taxonomies in WordPress 2.8), shows how to add cloud for taxonomy, but not list:

    <?php wp_tag_cloud( array( 'taxonomy' => 'people', 'number' => 45 ) ); ?>

    I know there is the list=format option for wp_tag_cloud but the resulting CSS is a mess.

    There are numerous posts on how to display a tag list. Can this be adapted for taxonomies? (maybe using get_terms and get_term_link??)
    http://wordpress.org/support/topic/220896.

  2. byNetizen
    Member
    Posted 4 years ago #

    Use the "format" parameter as well

    <?php wp_tag_cloud( array( 'taxonomy'=>'people' , 'format'=>'list' ) ); ?>

    You can find the tag cloud parameters here:

    http://codex.wordpress.org/Template_Tags/wp_tag_cloud

    Cheers!

  3. pikemurdy
    Member
    Posted 4 years ago #

    I'm getting here pretty late... but if you're just wanting a list of everything in a taxonomy, you may be better off using the wp_list_categories tag.

    http://codex.wordpress.org/Template_Tags/wp_list_categories#Display_Terms_in_a_custom_taxonomy

  4. whipd09
    Member
    Posted 4 years ago #

    pikemurdy,

    Is there a way you could show related posts under each term? In a tree-child-branch sort of way.

Topic Closed

This topic has been closed to new replies.

About this Topic