• Resolved robertm344

    (@robertm344)


    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • the error could be in the content of the tenth post, or in any of the posts.

    try and see if the results of a validation check might give you a hint: https://validator.w3.org/

    if you want to have some assistance with finding the cause of the problem, please post a link to your site, with ten posts and the problem evident.

    Thread Starter robertm344

    (@robertm344)

    You, my friend, hit the nail on the head. The previous post was missing a single quotation mark. Thank you for the help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tenth post falling outside of loop.’ is closed to new replies.