Remove selected category from Sidebar

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4903
    David Hemmer
    Guest

    hi

    I am grateful for this theme. its smooth and works pretty well thus far. Being a NOOB I still haven’t gotten my hands dirty enough with PHP but I have something I want to do.

    I would like to exclude certain categories from my sidebar.

    Its a theme widget used for the sidebar and I haven’t been able to track down where to apply my exclude function.

    any advice?

    thanks

    #4906
    Ron
    Keymaster

    Its a theme widget used for the sidebar

    The category widget I’m seeing on your sidebar is not added by the theme. It’s one of the default widgets that comes with WordPress core. The theme only provides widget areas to place them on.

    You can either add this code on your child-theme’s functions.php or use a plugin like the one below.

    function exclude_widget_categories($args) {
        // The numbers are the excluded category IDs
        $args["exclude"] = "5,10,20";
        return $args;
    }
    add_filter( 'widget_categories_args', 'exclude_widget_categories' );

    http://wordpress.org/plugins/widgets-reloaded/

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘WordPress Themes’ is closed to new topics and replies.