Support » Fixing WordPress » gallery next/previous link

  • Hi

    Does anyone know how the (next/previous) regular WP works?? or more specifically how to get more control over it?

    I’ve created a gallery and when clicking ‘next’ it goes to the the next image in the media library not the next image in the gallery (which seems a bit nonsensical to me). (To get round that I’ve had to upload all images at the same time via the gallery, this seems to solve it but I’m not sure if I’ll run into the same problems when I want to add to the gallery). Then, if I re-arrange the gallery and use the next/previous links they don’t follow the order that I’ve placed the images and will only follow the order that they are in in the media library.

    I’ve been hunting round for answers but haven’t found anything and i didn’t want to use a gallery plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator t-p

    (@t-p)

    Does anyone know how the (next/previous) regular WP works??

    https://codex.wordpress.org/Next_and_Previous_Links

    More codex guides: https://wordpress.org/search/next%2Fprevious+codex?forums=1

    thanks t-p but I don’t think you read the post

    ..it’s next/previous (in an image gallery) I’m referring to – I’ve got it to work but it’s not cycling through the images from the gallery (only through the media library) and though I think I may have sorted that by uploading directly via the gallery when I re-arrange the order of the gallery the next/previous links do not follow the correct order of the gallery

    thanks

    Moderator t-p

    (@t-p)

    are you using any gallery plugin?

    further to the above, does anyone know if this is a wordpress glitch? as someone else was having the same issue over 3 years ago.. https://wordpress.org/support/topic/gallery-order-and-image-attachment-order-messes-up/

    (no I’m just using the regular WP gallery (latest WP version)

    you can re-create the issue yourself..

    1. add say 5 images to the media library
    2. create a gallery, with 2/3 of those images linking to the attachment page (with a next/previous link)
    3. using the next previous/link it will cycle through all 5 images (not just the 3 images in the gallery)

    then..
    1. upload 3 images directly into a new gallery
    2. on the attachment page the next/previous will cycle through just those 3 images…all good 🙂
    3. however, change the order of the gallery images, the next/previous will cycle through only in the order of the upload (not the re-ordered gallery)… not good 🙁

    • This reply was modified 3 years, 1 month ago by jonesy2324.

    I have this problem also. I wish it would be fixed.

    • This reply was modified 2 years, 9 months ago by screaminscott.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘gallery next/previous link’ is closed to new replies.