I don’t have a solution for you, I just wanted to say that this has been happening to me for over a year now – regardless of the version of WordPress or PHP. I posted about this issue here several times, but never got a solution. So… all the links I post in a gallery just go to the lightbox, NOT to the URL. IF someone clicks the image in the lightbox, it will go to the URL, but most people don’t click that image a second time. This plugin used to work perfectly, but it hasn’t worked right now for about 1-1/2 years.
Maybe someone will post a solution. I’ve not found one yet.
Hi @zargarov and @bjt1t2t3b,
Gallery Custom Links wraps your image in a link, then tries to neutralize the lightbox so the click follows that link instead of opening an overlay. The way it currently does this only works with older lightboxes. Modern ones, including the lightbox built into WordPress itself (the “Expand on click” option on image and gallery blocks), attach their click handlers in a way the plugin doesn’t currently remove. Depending on the lightbox, you get one of the two behaviors you described: either the lightbox swallows the click and the link never opens, or both fire and the page navigates right after the lightbox flashes open. This isn’t related to PHP 8.3 or a specific WordPress version, it’s purely a click handler conflict in the browser.
I’m fixing this properly for the next update (should be available as of now). The plugin will intercept the click before any lightbox can react, which will work regardless of which lightbox is involved, including the WordPress one.
Thanks for your patience! 😊
Jordy.