Support » Fixing WordPress » Showing only the parents that are in category or sub category or sub sub categor

  • Resolved lordtrini

    (@lordtrini)


    I am trying to show show only the parents that are in category or sub category or sub sub category but not their children.

    So when i have an archive page with a many categories, only the child element that are one level down shows. Their grand children or great grand children must never show. Please help. Many Karmatic Point to to you all.

    The code below is what i am trying to modify.

    <?php
          wp_list_categories(
          array(
    	     'orderby'=>'id',
    	     'show_count'=>0,
    	     'title_li'=>'',
    	     'use_desc_for_title'=>1,
    	     'child_of'=>$this_category->cat_ID
    		)
          );
    ?>

    [Please post code snippets between backticks or use the code button.]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Showing only the parents that are in category or sub category or sub sub categor’ is closed to new replies.