I wrote that this plugin was working to exclude posts from certain categories from showing on the frontpage
But then I went to my WP-E-Commerce Products Page – the Page that has the shortcode [ productspage ] and my Featured Products were getting wiped out.
So I changed the query in frontpage-category-filter.php lines 50 to 56:
if ( $query->is_home AND $query->get('post_type') != 'nav_menu_item' ) {
$query->set('category__in', explode(',', $featured_category_id));
//$query->set('posts_per_page', get_option('merlic_filtercategory_postslimit'));
}
return $query;
}
TO (edited code):
if ( $query->is_main_query() && $query->is_front_page() && $query->get('post_type') != 'nav_menu_item' ) {
$query->set('category__in', explode(',', $featured_category_id));
//$query->set('posts_per_page', get_option('merlic_filtercategory_postslimit'));
}
return $query;
}
Which fixed the issue for me.
I got the idea from this post in another forum:
https://wordpress.stackexchange.com/questions/58033/pre-get-posts-in-combination-with-is-front-page