hi guys , I am new to the wordpress section , this is my first post here and I wish you help me out. I have a WP blog , the problem is that there is one particular categorie that I don't want it to be seen , I want to hide it. Here is the part of my Sidebar code that needs to be modified : <div id="sub-sidebar"> <div class="left"> <ul><?php wp_list_categories('hide_empty=0&show_count=0&title_li=<h2>' . __('Categories', 'kubrick') . '</h2>'); ?></ul> <?php dynamic_sidebar('sidebar_left');?> </div> Code (markup): The category that I want to hide is cat_ID=28. So please help guys , I've tried all kinds of plugins but nothing seem to be working. Thank you very much in advance
Try this code: <div id="sub-sidebar"> <div class="left"> <ul><?php wp_list_categories('exclude=28&hide_empty=0&show_count=0&title_li=<h2>' . __('Categories', 'kubrick') . '</h2>'); ?></ul> <?php dynamic_sidebar('sidebar_left');?> </div> Code (markup):
wp category exclude rule: exclude=28 u can enter more cat ID for hiding them. wp category include rule replace 28,26,27 with your categories no.
use this code <ul><?php wp_list_categories('include=28,26,27&hide_empty=0&show_count=0&title_li=<h2>' . __('Categories', 'kubrick') . '</h2>'); ?></ul> to hide category or simply use category plug in