I altered the Merch theme for my knowledge based website
I changed the Merch blog home page (https://gpsites.co/merch/blog/) to (https://nir-for-food.com/industries/)
The page uses WSP and I used PHP snippets to exclude categories I did not want to be pulled to the page
They were both working for a while but now one exclusion PHP for one category is not working.
I don’t know why.
The PHP code is the following:
function exclude_Applications( $query ) {
if ( $query->is_Home() && $query->is_main_query() ) {
$query->set( ‘cat’, ‘-26’ );
}
}
add_action( ‘pre_get_posts’, ‘exclude_Applications’ );
I am trying to exclude the category applications and wondered why the PHP code above use to work but now doesn’t?
I tried your suggestions but it won’t work. I have the exact PHP snippet to exclude another category and it is working. However, this one just won’t work. I can’t figure out why it won’t.