How To Exclude WordPress Category

iTunes, App Store, iBookstore, and Mac App Store

You can exclude certain categories you don’t want them to show at your homepage, singe page or any pages on your WordPress blog. The reason for excluding category may vary, as for me, I don’t want my second navigation looks crowded especially with categories that are not really important or with less posts.

Thus as you can see in my category horizontal list above I only put 9 categories of 12 categories this blog has. And what I did to exclude unwanted categories from showing up is adding this function:

<?php wp_list_categories('title_li=&exclude=1,2,3'); ?>

1, 2 and 3 are categories ID that to be excluded and you can find categories ID on your category section (Post -> Categories), then point your cursor to the category name you wish to exclude to find its ID:

Wordpress Category List

Thus change 1,2 and 3 with your own category ID to make them/it excluded and not show up on your WordPress blog!

About Isa Nagib

Hi I am Isa Nagib, one of the contributors of this blog. I like writing and reading all the about technology stuff, thus this blog is media for me to write down about technology!

Be my Twitter, Facebook, +Isa Nagib Google friends, together we can be good friends

Abi