Home › Forums › Add-ons › Gallery Field › "Infinite scroll" for an ACF Gallery page? › Reply To: "Infinite scroll" for an ACF Gallery page?
When you say,
.. that does a simple loop through the ACF Gallery data structure and renders out a thumbnail gallery.
makes me think you’re doing something outside of what a standard WP loop would do, so also outside any type of standard pagination that could be used, so it’s going to need to be custom built.
As an alternate, and this is just a suggestion to think about, Don’t know how far you are into this thing, and it might be too far along to change plans, but, I would use a custom post type with an archive, use pre_get_posts to set up how many to show, and then use standard WP pagination and let WP take care of the details.
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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.