Yep, works like a charm here… so far. Tested in the new mx4 theme.
In the main index.php (WP root directory), place the following code:
if(empty($_SERVER[‘QUERY_STRING’]) || (isset($_GET[‘feed’]) && !(isset($_GET[‘cat’]) || isset($_GET[‘category_name’])))) {
$cat=’2, 3, 4′;
}
where 2, 3, 4, etc are the categories you need to INCLUDE, not exclude
place the above code right before the following line:
require(‘./wp-blog-header.php’);
?>
edit: oops, it hides the posts alright, but i get error page when i go to the category where the unlisted posts are housed. Hmmm…
edit 2: okay, something was buggy on my test WP installation, so I tested it on my main site (both the code and the mx4 theme) and it works. I think we’ve got a good solution here, childrensfitness, courtesy of Kafkaesqui. Good luck. ??
edit 3: lol, this is gettting interesting. The hidden posts still show in the sidebar listing of “recent posts” when viewing other posts in single pages. Also, I never noticed originally, there is an additional header line above all posts on the main page. Back to quirking.