Problem excluding a post category
-
Hi,
I am using a home-made theme that works perfectly in 2.6, both locally and online. I’ve recently upgraded to 2.7 – my theme works perfectly locally (XP Home SP3, XAMP Lite 1.6.8 with PHP 5.2.6), but breaks online (PHP 5.2.4, MySQL 4.1.22).
I want to exclude all posts in category 5 from the main blog page. I have tried:
<?php query_posts($query_string . '&cat=-5'); ?>
just before the loop, and
<?php if (in_category('5')) continue; ?>'
within the loop.Both methods work fine locally but fail online – all posts are shown.
I know that the category number is correct as category-5.php works just as expected. I’ve tried uploading a fresh copy of the template to no avail.
Any clues as to what could be awry would be very welcome! (I’ve searched the forums for a similar problem without any luck.)
Thanks.
The topic ‘Problem excluding a post category’ is closed to new replies.