Viewing 7 replies - 1 through 7 (of 7 total)
  • It looks like the excerpts in the Good News sidebar are enclosed in two paragraph tags:

    <p><p>“He sent out his word and healed them; he rescued them from the grave.” (Psalm 107:20 NIV) Jesus even said we would do greater things than He did, including raising [&hellip;]</p>
    </p>

    Are you using a plugin to display the Good News section or was it part of the theme? If this section is automatically generated, there may have been a bug in the theme or plugin that caused the excerpts to be enclosed paragraphs tags twice.

    Thread Starter astephens

    (@astephens)

    Not using a plugin or theme but using a blank theme created from scratch (within WP) in a web design class.
    I can see that the only 4 places it shows is on the home page for the excerpts. It doesn’t appear to be in the blog post itself. Although I can see it in the source line numbers when i do the validator (as you showed in your response), it’s been hard to find which file it’s in when i’m in WP.
    I did find this with <p> tags and wondered if it should be there as well as the blog post itself… and whether that was the duplication?

    <div class="entry">
    <p><?php the_excerpt(); ?></p>
    </div>

    Thread Starter astephens

    (@astephens)

    however i did try removing those <p> tags at that spot and it still showed the validator errors.

    Instead of using the_excerpt() to display the excerpt, you can try this instead: <?php echo get_the_excerpt(); ?>

    It’ll retrieve the excerpt without the extra html tags (like <p>). This might remove the extra paragraph tag.

    Thread Starter astephens

    (@astephens)

    Looks like that worked. I ran the validator again and all 4 <p> tag errors are gone… all clear. Thanks so much!

    Only thing is the text in the excerpt on home page sidebar has changed… looks larger. Do you know where i would find the css to style that?
    I’m looking…

    Since you’re displaying the excerpt without the extra html tags now, and if you removed the <p> tags from before, the styling was also removed since the style relied on the <p> tag. If you add the <p> again in between the excerpt – <p> <?php echo get_the_excerpt; ?> </p> this should make it look the way it was before.

    Thread Starter astephens

    (@astephens)

    Excellent! (you’re good!)
    Validator still says no errors now.
    Thank you!!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘correct tag error in excerpt with ellipsis’ is closed to new replies.