I'm trying to get prev/next entry using positionedAfter and positionedBefore filters but getting weird order on results because order('postDate desc') seems to be ignored.
{% set prevSibling = craft.entries.positionedAfter(entry).order('postDate desc').first() %}
{% set nextSibling = craft.entries.positionedBefore(entry).order('postDate desc').first() %}
Can anyone help?
positionedAfterandpositionedBeforewill return the entry before/after in the Structure in the CMS, regardless of how you order them on the front end using.order(). If you're using this for a blog, you should be using a channel rather than a structure. – darylknight Sep 27 '17 at 12:49