Reputation: 4681
I can't work out why, but for some reason there are multiple empty paragraph tags being outputted on my page. My template looks like this:
<article class="post-item sm-col sm-col-12 md-col md-col-5 {{ thecycle }}">
<header>
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
</header>
<p>{{ post.excerpt }}<p>
<footer>
<p class="date"><time pubdate datetime="{{ post.date }}">{{ post.date | date: "%B %-d, %Y" }}</time></p>
</footer>
</article>
But my static HTML looks like this:
Where are those extra paragraph tags coming from?
Any help with this is appreciated. Thanks in advance!
Upvotes: 3
Views: 464
Reputation: 52829
This is because post.excerpt
is already wrapped in p tag.
If you want to output excerpt with no p tag, you can do {{ post.excerpt | remove: '<p>' | remove: '</p>' }}
.
Upvotes: 4