Support » Fixing WordPress » Home page posts are dispaying unwanted text with the_excerpt()

  • I used a tutorial from sitepoint.com to make a magazine style home page where posts have a thumbnail with abridged text using a custom function in a child theme for the loop. Oddly, the description shows up in between the <p> tags just before the actual post. Somehow, the content I entered in the featured image of the post “bleeds” in front of the post content only on the home page. Help? Thank you.

    function nwdn_indexloop() {
    query_posts("posts_per_page=6");
    if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
    <h2><?php the_category(); ?></h2>
    <?php thematic_postheader();
    if (has_post_thumbnail() && !is_paged()) {
    the_post_thumbnail('homepage-thumbnail');
    } ?>
    <div class="entry-content">
    <?php the_excerpt(); ?>
    <a href="<?php the_permalink(); ?>" class="more">
    <?php echo more_text() ?></a>
    </div>
    </div><!-- .post -->
    <?php endwhile; else: ?>
    <h2>Eek</h2>
    <p>There are no posts to show!</p>
    <?php endif;
    wp_reset_query();
    }
  • The topic ‘Home page posts are dispaying unwanted text with the_excerpt()’ is closed to new replies.