In WordPress plugin coding, if I have two categories (cars and gardening) and I want to always exclude gardening from all queries, what is the intercept (hook or other trick) I need to do to do this? I need to always exclude gardening whether it be via search, tag cloud widget, comment widget, calendar widget, and any other portion of the website.
The reason I ask is that my client needs to have a single theme react differently by domain name coming in. If the user types gardening.com and it's mapped to this blog, then he wants to restrict to show only gardening.com content. If the user types cars.com and it's mapped to this same blog, then he wants to restrict to show only cars.com content.
Said again, my question lies in the area of wanting to hit one central place of WordPress with a plugin hook to always ensure the queries are restricted to a given category. That way, even if a new plugin is added that's not a default coming with WordPress, it will also be restricted by category too.
I have already figured out how to slip this code in the header.php of a theme to make the links act properly depending on whichever URL someone types in:
$sURL = 'http://' . $_SERVER['SERVER_NAME'];
update_option('siteurl',$sURL);
update_option('home',$sURL);
unset($sURL);