Home › Forums › General Issues › List posts by date picker with pagination › Reply To: List posts by date picker with pagination
You do not need to set paged query arguments if WP is already doing this. It happens automatically when the url includes /page/XX/
I don’t completely understand your query or why you would do something different on pages>2 verses page 1. but here are some things
$query->set( 'posts_per_page', -1 );
cause there to be no pages and all of the paged stuff you are setting is ignored.
You want your query for all pages to be identical or you will get different results.
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.