<?php
function exclude_widget_categories($args){
$exclude = "1,17"; // The IDs of the excluding categories
$args["exclude"] = $exclude;
return $args;
}
add_filter("widget_categories_args","exclude_widget_categories");
?>
E-Learning, Web Design, Linux, PHP, Wordpress, Visual Studio .NET, Windows, SQL Server, ASP.NET, C#
Sep 2, 2012
Exclude category from wordpress default widget
If you use wordpress default widget in your theme, you will notice that you don't have an option to exclude the category. In such case you can use some plugin's and get your work done, but i prefer to use less plugins and do more of coding things. So in such case I write the below code in functions.php file located in my selected theme folder.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment