• boborg

    (@boborg)


    Is it possible to display the sub categories of a current category with the same output layout as <?php the_category(‘ | ‘) ?> ?

    Currently I have this code

    <?php $cat_ID = get_query_var('cat');
    $children=  get_categories('child_of='.$cat_ID) ;
    if ( $children && $children != 'No categories' ) {
    wp_list_categories('title_li&hide_empty=0&style=none&child_of='.$cat_ID);
    }?>

    This gives all the sub categories but with line breaks but I would like to show them all inline separated by a |.

  • The topic ‘wp_list_categories child of like’ is closed to new replies.