Exclude Categories for Blog only works on first selected category

resolved (5 posts) (2 voices)

  1. I have multiple categories I'm excluding from the blog on inFocus, but only the first category I've selected is being excluded. I've switched around which category is first and whichever one is first is excluded while all the rest are shown.

    Posted 7 months ago #
  2. Elliott
    Support

    Hello cconover,

    It seems to be working fine on my end. If possible send us a link to your page and let us know which categories you are excluding. If your using the blog shortcode then paste it here so we can see how it's being used.

    Posted 7 months ago #
  3. Here's the page: http://christiaanconover.com

    The categories I'm excluding are: Short Stuff, KB3MMY

    Short Stuff is the first category being excluded, and is being excluded. KB3MMY is the second, and is not being excluded.

    This is in the inFocus admin panel Blog settings. No shortcode is being used.

    Posted 7 months ago #
  4. Elliott
    Support

    Looks like it could be a bug when using it on the homepage.

    Try opening up /wp-content/themes/[your_theme]/lib/functions/theme.php and around line 1198 you should see this,

    $args = array_merge( $wp_query->query, array( 'post_type'=> 'post', 'paged'=> $paged, 'offset' => $mysite->offset, 'category__not_in' => mysite_exclude_category_string( $minus = false ) ) );

    Try changing it like this,

    $args = array_merge( $wp_query->query, array( 'post_type'=> 'post', 'paged'=> $paged, 'offset' => $mysite->offset, 'cat' => mysite_exclude_category_string() ) );

    Posted 7 months ago #
  5. That looks to have worked, thanks!

    It was actually on line 1184, FYI.

    Posted 7 months ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme