<?php
function modify_widget_categories($args){
$include = "3,6,18"; // The IDs of the including categories
$args["include"] = $include ;
$args["hide_empty"] = 0; // If it is 0 it will show the empty categories as well
return $args;
}
add_filter("widget_categories_args","modify_widget_categories");
?>
You can find the full list of parameters to modify the widget categories here: http://codex.wordpress.org/Function_Reference/get_categories#Default_Usage
.
No comments:
Post a Comment