Do the templates use custom queries?
This is my code for the ‘Meet The Gang’ area.
<div id="main-column">
<?php query_posts('cat=-10,-12'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post-thumbnail">
<?php the_post_thumbnail('thumbnail'); ?>
</div>
<div class="post-content">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(''); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Read more about <?php the_title(); ?></a>
</div>
</div>
<?php endwhile; ?>
<?php else : ?>
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
<?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?>
</div> <!-- closes "main-column" -->
Cheers,
Chris
I’m giving this a quick bump, as I probably posted at the wrong time of day yesterday (I’m in Australia. I expect my post was long buried by the time most of you guys were awake). π
Sorry to keep bringing this up guys, but I’m really stuck. Anyone have any thoughts as to what the issue could be?
I don’t see anything wrong with your code at first glance. Is this being used with a custom post type in a post-type-specific template?
If so, you can try visiting the permalinks page in your admin, clicking save/update (you don’t need to make any changes) this forces wordpress to look for newly created templates for custom post types and rebuild rewrite and template rules. It seems to me like wordpress might not be using the template you want it to.
That’s just a guess, though. Good luck! I’ll be watching this thread to see how this turns out.
– Greg
The plugin you’re using WP Page Numbers hasn’t been updated since 2009 and has only been verified to work up to version WP 2.8.
I would recommend de-activating this plugin in favor of standard pagination or WP Page Navi…
Other users have reported similar problems with this plugin (unfortunately with no solution)…
http://wordpress.org/support/topic/wp_page_numbers-plugin-did-not-work?replies=1
try changing this section:
<?php query_posts('cat=-10,-12'); ?>
to:
<?php global $query_string;
query_posts($query_string . '&cat=-10,-12'); ?>
http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note
Thanks for your help gents.
I’ve changed the page numbers plugin and this has had no impact. I adjusted the code as per alchymyth’s suggestions, and this has fixed the problem, but brought an issue I had last week – categories 10 & 12 need to be excluded from the ‘Meet The Gang’ section of the site, and only appear in their specific category lists.
http://wordpress.org/support/topic/exclude-categories-malfunctioning?replies=5
All of these issues have started since upgrading to WP 3.1.2. π
Cheers,
Chris
Anyone have any further thoughts on this?