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