• crewdy

    (@crewdy)


    I’ve managed to format a piece of php which will grab all of the sub-categories for any given category that you are currently looking in. However, currently this appears on every page, even if the category has no child categories. After much struggling, I have given up on trying to find a solution. I am looking for an ‘if’ statement that will define if the current category has child’s, and then display’s the following code if it does.


    <ul id="cat-list">
    Note: This category has been split in to several sub-categories for easier browsing. Please click on the following links to narrow your search
    <?php
    wp_list_cats('sort_column=id&optioncount=0&use_desc_for_title=0&child_of=' . $wp_query->get_queried_object_id() . '');
    ?>
    </ul>

    If anybody can help, it would be much appreciated!

Viewing 1 replies (of 1 total)
  • Thread Starter crewdy

    (@crewdy)

    Bump… Does anyone have any ideas for this? I still haven’t been able to find a solution. You can see it working as it does at the moment on eyesonexeter.com, in the sports/recreation categories.

Viewing 1 replies (of 1 total)
  • The topic ‘Displaying Lists if Category Child’ is closed to new replies.