I tried it all and since i am not so good in this coding, I want to hide a category and his posts from the homepage I tried all plugins especially wp hide post but it needs pro version and seems Support is not answering on my emails so i rather do not buy that i tried the code that i found everywhere see below,
however my theme has his own categories for products (taxonomy=download_category&post_type=download)
the code i found and tried in many ways to change
function exclude_category($query) {
if ( $query->is_home() ) {
$query->set( 'cat', '-156, -58,-154,-155' );
}
return $query;
}
add_filter( 'pre_get_posts', 'exclude_category' );
so 1 of the things i tried was
function exclude_category_download($query) {
if ( $query->is_home() ) {
$query->set('cat', '-156, -58,-154,-155');
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category_download');
I am completely lost could really use some help