• Hello!

    Here is what I want to do to my site. For example, I have this category structure:


    - Number [of widgets] (parent category)
    -- 1 (child category)
    -- 2
    -- 3
    - Color [of widgets] (parent category)
    -- Blue (child category)
    -- Red
    -- Green
    -- White

    So when I post, I will choose 1 (childof Number category) and Blue and White (child of Color category)

    The question is:
    How do I present them in my post to automatically list the categories as:


    <strong>Number:</strong> (will list all chosen child categories for Number; in this case, 1)
    <strong>Color:</strong> (will post Blue, White)

    How do I go about listing the possible child categories in what way?
    Thank you!

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter Licorne

    (@licorne)

    Ok. Thank you. Sorry if this is the wrong place or forum but, do you know where I can find someone who can write the plugin? I’m willing to pay for it.

    You can send an email to thye WP Pro mailing list. https://codex.www.ads-software.com/Mailing_Lists#Professional

    I have been looking for the same thing for a long time. After much trial and error, here is a solution that works well for me. Pretty code and no plugin needed ??

    <?php
    foreach((get_the_category()) as $cat) {
    if ($cat->category_parent == "1234") {
    echo '&bull; <a href="?cat=' . $cat->cat_ID . '">' . $cat->cat_name . '</a>';
    }
    }
    ?>

    Where 1234 is the ID of the category parent you want to display children of.

    Thanks everyone at this thread for showing me where to look.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Separate Category List by Parent Category’ is closed to new replies.