Forums

[resolved] how to get child categories for current category? (3 posts)

  1. billpeace
    Member
    Posted 2 years ago #

    if(is_category){
    !* I want to get all child categories ID
    so how ?
    }

    thanks

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    <?php
    if ( is_category() ) {
    $child_cats = get_categories('child_of='.get_query_var('cat'));
    }
    ?>

    See Function_Reference/get_categories

  3. billpeace
    Member
    Posted 2 years ago #

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.