Не правильная сортировка галереи
Есть галерея на чистом вордпресс - в ней изображения с именами и порядком 1 "2" 3 4 5 6 и тд.
При удалении из галереи изображения и вставки на его место (в процессе редактирования и сортировки) нового изображения с таким же или другим именем выводится галерея
1"2"3
4 5 6
7 8 9
но при открытии изображения через image.php по командам перелистывания previous_image_link() и next_image_link() -
нарушается сортировка 1 "2" 3 4 5 6 и превращается в 1 3 4 5 6 "2"
как лечить ?
вот что пишут на одном из сайтов
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.
не придется ли искать решение в команде get_permalink( и get_the_permalink(