Home › Forums › ACF PRO › Repeater Fields and pre_get_posts › Reply To: Repeater Fields and pre_get_posts
john, firstly let me apologise for not thanking you sooner – for some reason i didn’t receive a notification that you had replied and have only just come back here to re-read everything because i still hadn’t found a solution.
now: i pasted your code in place of mine, having seen your example working, and it’s working fine for me. thank you so much. the difference is simply in the way in which you’ve targeted the query, correct? with this line?
if (is_admin() || !$query->is_home() || !$query->is_main_query()) {
return;
i can’t thank you enough for being so persistent in your help tracking this down.
the second filter is designed to prevent an empty page at the very end of the paginated feed, as per this article: https://codex.wordpress.org/Making_Custom_Queries_using_Offset_and_Pagination – however, everything seems to be fine without it, so i’m going to leave it out!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.