You can say it as How to Show Specific Categories in Navigation or How to Exclude Specific Categories from Navigation. Both are almost one and same thing. For this, we just have to edit a simple php code which is calling Categories in Navigation from Header.php of your theme file.
The Ordinary Code looks mostly like:
<?php wp_list_categories(‘title_li=&exclude=’ . $ex_aside) ?>
- Now if you want to un-show some categories or want to show only those you want. Just do these simple steps.
- Find the above code in Header.php of your theme file.
Replace it with this code:
<?php wp_list_categories(‘title_li=&include=3,5,7,12′);?>
In the above code, 3, 5, 7 and 12 are the IDs of your categories. Only add IDs of those you want to show in navigation. Rest will be excluded.




July 25th, 2009 at 5:47 am
Thanks buddy this really helped me
[Reply]
July 29th, 2009 at 5:23 pm
Thanks for this! Really useful to keep these and other useful wordpress code snippets around.
.-= Buy PSP Go´s last blog ..Sony Considered Second Analog Stick for PSP Go =-.
[Reply]
August 6th, 2009 at 9:20 am
Nice work man. Keep it up.
[Reply]