WordPress.org

Ready to get started?Download WordPress

Forums

Children Check? (3 posts)

  1. markgarrigan
    Member
    Posted 8 years ago #

    Is there a way to check if the current category has any children?

  2. markgarrigan
    Member
    Posted 8 years ago #

    This seems easy enough... i just need a query to check for all the categories with a parent of the current category... but how do you write custom queries?

  3. Lorelle
    Member
    Posted 8 years ago #

    Are you trying to show children or just find out if there are any there?

    To find out if any are there, check your ADMIN > MANAGE > CATEGORIES (I know that sounds too simple, but sometimes people just don't know these things - making no assumptions about you.)

    To show the categories with the children (ONLY if there are posts in the category will they show), check out:

    http://codex.wordpress.org/Template_Tags/wp_list_cats
    http://codex.wordpress.org/Template_Tags/list_cats

    If you are looking for a specific "If categories" conditional tag:

    http://codex.wordpress.org/Conditional_Tags

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags