Support

Account

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!