-
Adam replied to the question Boss Theme XML updated files in the forum Boss. theme 8 years, 5 months ago
Hello,
Sorry dont think you read my last support question right. I’m needing help for the default blog page as you gave me a code line that removes certain post ID categories from the blog default page but I am wanting to display them on another page with a post shortcode but now the post ID are hidden over the whole website. Basically I only want to remove them from the blog page and use them on another page.
function exclude_category($query) {
if ( $query->is_home || $query->is_archive) {
$query->set(‘cat’, ‘-49 -50’);
}
return $query;
}
add_filter(‘pre_get_posts’, ‘exclude_category’);If the code above could only remove it from the blog page.
Regards,
Adam