Can't list child categories unless I output the parent as well. (2 posts)

  1. Tammy Hart
    Posted 5 years ago #

    I had a special list of categories I wanted to feature, and it was working great, but then I decided to do more organization and move them into parent categories, and now the entire list has disappeared. I finally figured out that it's because I'm not telling it to also list the parent cat.

    Here is the code:

    <ul id="featured">
    <?php wp_list_categories('title_li=&include=4,13,41,42,47,49,50&hide_empty=0'); ?>

    For instance, categories 13, 41, and 49 are now children of 72. If I add 72 to that list above, those three child cats will list fine. But I don't want to list cat 72.

    Ugh, I hope I'm making sense. Any help would be great.

  2. jhorra
    Posted 5 years ago #

    I'll post this here in case it helps anyone else. I noticed that one of the parameters you can pass is child_of, not sure it it will work but you could try adding child_of=72. Although that might exclude the others that aren't a child of it.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.