Hi,
Open wp-includes/widgets.php file at your local and edit it..you need to do it as these:
Find this line:
$d = $options[$number][‘dropdown’] ? ‘1’ : ‘0’;
Add this line below this line:
$ex = “1,2,3”;
1,2,3 are the categories which you would like to exclude..
Find this line:
$cat_args = array(‘orderby’ => ‘name’, ‘show_count’ => $c, ‘hierarchical’ => $h);
replace with:
$cat_args = array(‘orderby’ => ‘name’, ‘show_count’ => $c, ‘hierarchical’ => $h, ‘exclude’ => $ex );
Save the file and upload it on the server again..you can replace the category ID with your desired one..
Thanks,
Shane G.
<?php wp_list_categories('show_count=1&exclude=10&title_li=<h2>Categories</h2>'); ?>
exclude=10, 10 being the category ID number you want to exclude
edit-I would not recommend edit of core WP files. In addition, when you upgrade your WP installation, such edit will be written over.
Thanks! (just wonder why I wasn’t notified of your post)
Can you also tell me how to have only one category displayed on the homepage?