Viewing 2 replies - 1 through 2 (of 2 total)
  • instead:

    // http://codex.wordpress.org/Function_Reference/get_categories
     foreach( get_categories('hide_empty=0') as $cat ) :
     if( !$cat->parent ) {
     echo '<ul><li><strong>' . $cat->name . '</strong></li>';
     process_cat_tree( $cat->term_id );
     }
     endforeach;

    try:

    // http://codex.wordpress.org/Function_Reference/get_term_by
    $cat = get_category(get_term_by('slug','exhibitions','category'));
    echo '<ul><li><strong>' . $cat->name . '</strong></li>';
    process_cat_tree( $cat->term_id );

    replace ‘exhibitions’ with the category slug of the corresponding category.

    (untested)

    Thread Starter Nicholas

    (@nicholas27)

    Hi alchymyth,

    That worked perfectly! Thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List of categories with post titles’ is closed to new replies.