WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got an interesting issue with my blog page-

Currently, I have two test posts- "Test Blog Post" and "Test Blog Post Deux." Test Blog Post displayed as it should, however when I added the second post(Test Blog Post Deux), the post content seemed to have overwritten the older content. You can see this in the post- the first paragraph begins with "This is another test blog post. Here’s some more ipsum.." and the second "This is a test blog post. Here’s some ipsum." without any post title, date, etc. in between.

Any ideas what's going on/how to fix?

Here's my code:

<div class="blog-meta">
    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    <h3>posted by ZOPA on <?php the_time('m/d/Y \a\t g:i A') ?> | <?php the_tags('tags: ',' , ','<br />'); ?></h3>
</div><!-- end blog-meta -->
<div class="blog-post">

        <?php if (have_posts()) : ?>  
        <?php while (have_posts()) : the_post(); ?>  
            <?php the_content('Read the rest of this entry »'); ?>  
        <?php endwhile; ?>  
        <?php else : ?>  
        //Something that happens when a post isn’t found.  
        <?php endif; ?>  

</div><!-- end blog-post -->
share|improve this question
up vote 1 down vote accepted

the_title() section is outside the loop which starts with if (have_posts())

consider reviewing:

share|improve this answer
Ah, yep. Thank you. – user1255049 Oct 14 '12 at 17:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.