I know that
<ul>
<?php wp_list_categories('orderby=name&exclude=3,5,9,16'); ?>
</ul>
Can be used to hide certain categories. However, this assumes I know their ID’s.
If I have a theme and I ask my client to make a category called ‘headlines’ and want that category to be excluded how can I do that if I don’t know the ID?
a lot of people use custom theme options and ask the user to input the categories they want to exclude here. sorry i cant be any more help i’m no wordpress guru
<?php $hideId = get_cat_ID( "headlines" );
wp_list_categories('orderby=name&exclude=' . $hideId . '');
?>
good luck
I’m using this in my navigation:
wp_list_categories('orderby=name&title_li=&hide_empty=1&exclude=1,'.get_option("ill_nav_exclude"));
and this in my control panel, the user inputs the ID’s of Categories and Pages they want to exclude.
array( "name" => "Navigation Exclude",
"desc" => "Enter a Category or Page ID (separate multiple by commas) to remove them from the navigation",
"id" => $shortname."_nav_exclude",
"type" => "text",
"std" => ""),
