I am currently developing a custom theme for a client. I have multiple pages using different loops that display posts from a certain category. All was going fine until I hit the tenth post in one of the categories. I have the loop nested in a div id=”content”. When the tenth post is displayed it displays outside of this div.
I have the “Settings < Reading < Blog pages show at most” set to 25.
The code for the template file itself is as follows:
<?php /** * Template Name: Team Page * * This is used for any page with team content. * * @package WordPress * @subpackage Hospitality Development Group */ get_header(); ?> <div id="main" class="team"> <div id="content"> <h1><?php the_title();?></h1> <?php get_template_part ( 'loop', 'team');?> </div><!--content--> </div><!--main--> </div><!--live_area--> <?php get_footer(); ?>
The code for the loop is as follows:
<?php query_posts('category_name=team&order=asc'); ?> <?php while (have_posts()) : the_post(); ?> <div class="post clear"> <h2><?php the_title(); ?></h2> <?php global $more; $more = 0;?> <?php the_content('Learn More'); ?> </div> <?php endwhile;?>
Any ideas of what might cause this?
- The topic ‘Tenth post falling outside of loop.’ is closed to new replies.