• Hi everyone. This one is baffling me as I have used this same code on another blog and had success. Here is the issue: I am building a blog within another blog. I have installed Category Template Inheritor to do this. I have also set up a template file called “blog” and am calling two custom queries. The problem lies with the paging. I have set it up as instructed here: http://codex.wordpress.org/The_Loop and here: http://codex.wordpress.org/Template_Tags/query_posts.

    Paging however, will not go, no matter what variation I am working with. Here is a synopsis of the code in question from here(http://wp.corpedia.com/blog):

    <?php
    /*
    Template Name: Blog
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php $my_query = new WP_Query('cat=10&showposts=3');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID;
    ?>
    <?php endwhile; ?>
    
    <?php
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("cat=8&showposts=20&paged=$page");
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts);
    ?>
    
    	<div class="post" id="post-<?php the_ID(); ?>">
    	<h2><a href="<?php the_permalink() ?>" rel="bookmark" border="0" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    		<?php the_excerpt(); ?>
    </div>
    
    <?php endwhile; ?>
    
    <?php else : ?>
    
    	<div class="post">
    	<h2 class="center">Not Found</h2>
    		<div class="entry">
    		<p>Sorry, but you are looking for something that isn't here.</p>
    		</div>
    	</div>
    
    <?php endif; ?>
    
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘query paging issues’ is closed to new replies.