• Resolved jvector

    (@jvector)


    I have a blog page generated by index.php in the normal way. On this page

    http://churchillassociates.eu/blog/page/4/

    the second post appears as
    <div class="post-543 post ...> *after* the <div id=”content”> section – i.e. the structure is

    <body>
     ...
      <div id="content">
        <div class="post-557 post ...id="post-557 ">...
        </div>
      </div>
     <div class="post-543 post ..." id="post-543 ">...
     </div>

    then the Older/Newer Posts links and footer.

    This messes up the styling. The content div has only one post in it. The Reading Settings is set to ‘Blog pages show at most [2] posts’. Older and Newer Posts pages are rendered correctly.

    I’m wondering if there could be something in the text of the post that is causing the main loop to fail? Or any other ideas? Thanks…

Viewing 4 replies - 1 through 4 (of 4 total)
  • check the loop in index.php, and see is the opening/closing divs in the loop are properly paired.

    i have the feeling, that the closing div for #content is accidentally within the loop.

    or paste the code of index.php (assuming that this is the template file that displays the front page) into a http://wordpress.pastebin.com/ and post the link to it here; someone might have a look at it.

    Thread Starter jvector

    (@jvector)

    Hi, I’ve had a look at the loop and it seems balanced to me. I’ve pastebinned it at http://wordpress.pastebin.com/vDiLsHfp .

    Looking at it, it looks like the content div and the extra post after div after it are all generated inside the while-loop, before the posts_nav_link generates Older/Newer Posts.

    Interestingly I’ve noticed that this same blog entry causes^H^H^H^H^H is associated with the same behaviour when you take a category view
    http://churchillassociates.eu/category/self-awareness/page/3/
    and other pages there are OK.

    you are right – well observed:

    edit this post (Parents, children and mental health), use the html editor, and see if at the end of the text you can find this lonely </div>
    (the </p> might not be there):

    ...ising that being a parent is one of the most demanding jobs around, and a little training might help us to help our kids grow up as emotionally robust human beings?</p>
    </div>

    if it is there – remove it.

    Thread Starter jvector

    (@jvector)

    Wow alchymyth that was awesome. I had been thinking that there might be a problem with weird non-ascii characters or something, it did not occur to me that there could be a stray /div tag in the post.

    It does not show up in the WP editor, not even in HTML view… I had to go into the DB with phpMyAdmin to find it ! 😉

    Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post is displayed outside of main content div’ is closed to new replies.