Exclude Child Categories Using wp_list_categories
Instead of excluding child categories, try to get only categories that have no parents (0) $cats = wp_list_categories( array( ‘parent’ => 0 ) ); That should work with no issues. EDIT: get_the_category_list() does not support advanced arguments. Your best bet is wp_get_post_categories($post_id, array(‘parent=>0’)). That will return an array of objects, you have to do the … Read more