admin管理员组文章数量:1427746
I'm attempting to mimic 'sticky' functionality on a custom post type using a simple ACF true/false field. I'd like to use pre_get_posts
to modify my query to first show my 'sticky' posts at the top and then loop through the rest, excluding the sticky ones.
I understand how to exclude posts by ID or by meta value from the query but am stuck on a good way to show the sticky ones first.
Q: what is a logical method for modifying the query using pre_get_posts
to show four specific posts before 'the rest'?
本文标签: advanced custom fieldsDisplay Specific Posts at Start of Loop
版权声明:本文标题:advanced custom fields - Display Specific Posts at Start of Loop 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745507253a2661301.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论