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
#1976)

posts) section
  • Loading branch information
mikemyl authored and mmistakes committed Nov 26, 2018
1 parent 851426d commit 319a746
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 319a746

Please # to comment.