amitmerchant1990 / amitmerchant-dot-com-comments

1 stars 0 forks source link

showing-related-posts-based-on-the-current-post-category-in-jekyll/ #115

Open utterances-bot opened 5 months ago

utterances-bot commented 5 months ago

Showing related posts based on the category of current post in Jekyll — Amit Merchant — A blog on PHP, JavaScript, and more

Lately, I wanted to show related posts on post pages based on the category the current post lies in. So, for instance, of the post belongs to the “Jekyll” category, I would fetch the recent five posts published under this category and show those on the post. In my case, as you can tell, I’ve shown it in the right sidebar under More in "Jekyll" label.

https://www.amitmerchant.com/showing-related-posts-based-on-the-current-post-category-in-jekyll/

Andreas665 commented 5 months ago

Hey there! Really helpful post! I was wondering if there is a way to exclude current post from showing..