I have just noticed that on my installation of wordpress, within the gallery image pages, the previous/next buttons are browsing through my entire media library rather than just those images that are in the designated gallery.

This means that users are able to scroll through images that are used for other purposes.

Is there a way I can ensure that the browsing is only for those images displayed in the gallery?

1 Answer 1


previous/next buttons bug

In the wordpress gallery, the previous/next buttons are browsing through the media files which are uploaded in the same page. Look in the library to see the "uploaded to" column.

To avoid browsing throughout your whole media library, you have to load your media in a specific page. From that specific page you must Add Media, Upload. In the Upload dialog window, you have in the right bottom the Attachment Display Settings. set the Link To option to Attachment page. See picture.

link media to

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.