WordPress.org

Ready to get started?Download WordPress

Forums

Category print question (4 posts)

  1. wpma
    Member
    Posted 5 years ago #

    Hi there!
    I got a quick question. <?php the_category(', ') ?> prints category + children but is there any code that DONT print children? Using 2.7.

    Thanks.

  2. Austin Matzko
    Member
    Posted 5 years ago #

    You probably want something like

    wp_list_categories(array('hierarchical' => false));

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

  3. MichaelH
    Member
    Posted 5 years ago #

  4. wpma
    Member
    Posted 5 years ago #

    Forgot to write that this is in a post. It´s only there i would like to hide children, not anywere else.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.