I've encountered some issues on a clients site since upgrading to WP 3.1.2, and have this evening updated to version 3.1.3, only to find that the problems still persist.
http://www.harmonyreins.com.au
The website is for a local animal shelter, and each post represents a different animal that lives at the shelter. There are a number of categories that specifically relate to the type of animal, such as dogs, cats, horse as well as a "recently adopted" and an "old friends" category. Those last two categories were excluded from the full post list (under 'Meet The Gang' in the navigation) using the following code:
<?php query_posts($query_string . '&cat=-10,-12'); ?>
The upgrade to WordPress 3.1.2 (or the accompanying database update, I'm not sure which) made this code redundant, and the excluded posts began appearing in the 'Meet The Gang' section. I enquired about the issue on WordPress.org, and the following fix was suggested:
Chris,
Replace the following in your theme's index.php
<?php query_posts($query_string . '&cat=-10,-12'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
with
<?php query_posts('cat=-10,-12'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
and you should be good.
Unfortunately this resulted in another issue, displaying the posts from page one of the list on page two also (you can see what I mean if you go to the site). I've tried multiple pagination plugins with no success. Regardless of what page you're on, only the first ten animals are displayed.
My client has been really good regarding this issue, but it's been going on for weeks now, and I really need to get it solved. Hoping someone can help me out. :-)
global $query_string;
before the query? alternatively, you could try:<?php query_posts('cat=-10,-12&paged='.get_query_var('paged')); ?>