Home › Forums › Add-ons › Gallery Field › attachment.php image navigation not following same order as ACF Gallery › Reply To: attachment.php image navigation not following same order as ACF Gallery
Managed to find a solution by building my own functions, I will explain the fix below:
The order of the ACF Gallery is stored in the SQL database table ‘wp_postmeta’, under the meta_value of (in my case) portfolio_gallery. There is an array of Image ID’s in the order you have saved them in. I had to gain access to this array, loop through the values, find the next and previous ID’s of the required images and output there URL’s via WP’s function get_permalink();
I will post my final code when I’ve had time to neaten it up 🙂
Hope this helps anyone else who finds them self in the same situation.
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!
© 2022 Advanced Custom Fields.