Home Forums General Issues Trouble filter query on acf checkbox value and $paged Reply To: Trouble filter query on acf checkbox value and $paged

  • Hi @brotsky_pixie

    The first problem with your code is that you specified the pagination for the main query, not the custom query ($query = new WP_Query( $args );). This code will always show a different page number even if you have the right custom query.

    Secondly, you manually hide the content by checking the custom field instead of filtering it from the custom query. This code will never show the right page number because your custom query doesn’t know that you hide certain contents after the query is initialized.

    To learn how to show pagination with a custom query, please take a look at this page:

    With the method described in that page, your first code is the closest one. Could you please share your JSON or XML export of your field group so I can check the query for you?