• Hi everyone,
    Hueman is – like Anew – a wonderful theme – kudos to Alexander!
    There is one thing though I’d like to be dealt with. If I dedicate a sidebar to e.g. Asides or Quotes (basically anything without a picture) I do not want these posts to appear in the main section as well.
    Posts without pictures don’t look too good there anyway, do they?
    A switch in configuration of the widget would be nice. Or an array in the general options to choose which categories to include into the main area …
    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter micdt

    (@micdt)

    For the time being this works.
    Category numbers ‘5’ and ’34’ are just examples of course…
    Add code to the functions.php of your child-theme:

    function exclude_category_home( $query ) {
        if ( $query->is_home ) {
            $query->set( 'cat', '-5, -34' );
        }
        return $query;
    }
     add_filter( 'pre_get_posts', 'exclude_category_home' );

    Thank you, micdt! This was exactly what I was looking for, and worked perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Exclude/Include certain categories’ is closed to new replies.