Hi,
I want the wordpress gallery images be displayed in a lightbox. Its working but only if the gallery image is linking to the file and not the attachment-site.
WP always links automatically to the attachement site. How can I change this standard behaviour?
Thx
Is it important where in the functions.php this strip is located? I need to change the word mytheme with the name of mine true?
Does this affect gallerys too?
Thx
You don’t have to change the Function name. You can, as long as it’s the same in both places. Also, it does not matter where you add this function to your theme’s functions.php file. Sometimes you have to add a function before calling the filter, and a priority order, but it should not matter with this function.
On testing, however, I see that I was mistaken on this functionality working for image galleries, it does not.
To update the default image linking behavior for image galleries, please use this function: