Last active
August 29, 2015 14:22
-
-
Save idavinder/8f9578fe5d317a1b1efe to your computer and use it in GitHub Desktop.
Exclude Categories from Category Dropdown Widget in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Exclude Categories from Category Widget - http://www.basicwp.com/exclude-categories-from-category-widgets-in-wordpress/ | |
function custom_category_widget($args) { | |
$exclude = "3,4"; // Category IDs to be excluded | |
$args["exclude"] = $exclude; | |
return $args; | |
} | |
add_filter("widget_categories_dropdown_args","custom_category_widget"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment