Testing Related Posts Limit
This page tests the related posts functionality to ensure it shows only 3-5 posts maximum.
Current Implementation
- ✅ Limited to 3 posts in line 49:
{% for post in sorted_posts limit: 3 %}
- ✅ Also limited in fallback (line 97):
limit: 3
- ✅ Checks maximum 30 posts for performance
- ✅ Requires minimum shared tags (1-2 depending on total tags)
If You're Seeing More Than 3 Related Posts
This could be due to:
- Multiple instances of the related posts component on the page
- Custom CSS making it appear like more posts are shown
- Browser cache showing old version
Debug Information
Total Posts in Site: 115
Related Posts Limit: 3
Posts Checked for Relevance: Maximum 30
Want to Change the Limit?
To show 5 posts instead of 3, change:
{% for post in sorted_posts limit: 3 %}
to:
{% for post in sorted_posts limit: 5 %}
And also update the fallback section similarly.