Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.