Skip to content

Commit

Permalink
Prevent current post from showing in the "You may also enjoy" (related (
Browse files Browse the repository at this point in the history
mmistakes#1976)

posts) section
  • Loading branch information
mikemyl authored and mmistakes committed Nov 26, 2018
1 parent 677d708 commit 3e7189e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label
<h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
<div class="grid__wrapper">
{% for post in site.posts limit:4 %}
{% if post.id == page.id %}
{% continue %}
{% endif %}
{% include archive-single.html type="grid" %}
{% endfor %}
</div>
Expand Down

0 comments on commit 3e7189e

Please sign in to comment.