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.

Is there any way to list the child categories only? I just want to filter the Parent Categories

share|improve this question
2  
What have you tried from get_categories‌​? –  brasofilo Jan 18 '13 at 16:32
    
I was missing exclude in get_categories it is working now some how. But i have to give the ids manually, is there any way to block the parents? –  Baig Jan 18 '13 at 16:39
1  
To answer this, you'd better give more details in the Question itself: >>edit<<. –  brasofilo Jan 18 '13 at 16:42

1 Answer 1

up vote 1 down vote accepted

The following code is to display the subcategory instead of parent . I am not sure this is the one as you are trying too.

 <ul> 
    <?php 
     $catsy = get_the_category();
     $myCat = $catsy->cat_ID;
        wp_list_categories('orderby=id&child_of='.$myCat); 
    ?>
    </ul>
share|improve this answer

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.