Home › Forums › Add-ons › Gallery Field › Pagination on Gallery Items › Reply To: Pagination on Gallery Items
Well, create a page with a url like this
site.com/articles/article_with_gallery/page1
You assign the ACF gallery to “article_with_gallery” and you grab the last part of the URL (“page1”), substring the “page” away and you get the current position for the gallery (=show first image on this page).
Then you just display the first image from the gallery (it’s a simple array). For the next page, the next gallery image.
The navigation (previous/next gallery image) simply takes you to the next/previous page in the URL.
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.