WordPress.org

Ready to get started?Download WordPress

Forums

Home page posts are dispaying unwanted text with the_excerpt() (1 post)

  1. SpicyNumberOne
    Member
    Posted 2 years ago #

    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();
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by SpicyNumberOne
  • This topic is not resolved
  • WordPress version: 3.3.2