Categoría de filtro de WordPress del widget
add_filter( 'widget_categories_args', 'widget_categories_args_filter', 10, 1 );
function widget_categories_args_filter( $cat_args ) {
$exclude_arr = array( 4 );
if( isset( $cat_args['exclude'] ) && !empty( $cat_args['exclude'] ) )
$exclude_arr = array_unique( array_merge( explode( ',', $cat_args['exclude'] ), $exclude_arr ) );
$cat_args['exclude'] = implode( ',', $exclude_arr );
return $cat_args;
}
Tequilian