I am using the posts element inside a post, and I want to show the posts of the same category, excluding the current post. What is the best way?
I tried using the offset setting, but I have several difficulties:
How do I activate the offset setting? I thought writing a “1” would be the more logic, but if I write a “1” and I put the current post in the filter, no post is show in the element.
Even if it works, how can I show the category and not the current post? If I put offset, I should put the post and ALL the categories except the one I want to show. It would be easier if each filter had their own offset. Do you find a way to do this?
Sure thing! So here’s a scenario explaining how it works; you have 5 Posts shown on the page using the Posts module and it is using the default order settings, by date and descending, so your Posts are shown in the order of Post 5, Post 4, Post 3, Post 2, and Post 1, with Post 5 being the latest. If you set the offset to 1, it will skip Post 5, so the contents will now be Post 4 -> Post 1. If you set it to 2, Posts 5 and 4 will be skipped, and the contents will now be Post 3 -> Post 1, and so on.