When on the single image page and I click on any of the product images in the gallery images pops up it seems to have to be clicked on twice to close the pop up image. How can I stop this so it just expands to a larger image and can scroll through and only click on cross to close once
Hey xfacta,
Please provide a link to the site/page in question so I can look into this issue.
Best regards,
Jordan Shannon
HI there here is an example: https://blackchicken.com.au/products/body/travel-skincare-kit/
Hi,
Try to add this code at the bottom of functions.php:
// Dequeue prettyPhoto
function prettyphoto_dequeue_script() {
wp_dequeue_script('prettyPhoto');
wp_dequeue_script('prettyPhoto-init');
}
add_action('wp_print_scripts', 'prettyphoto_dequeue_script', 100);
Hope this helps :)
Best regards,
Nikko
PERFECT!! Thank you so much :-)
How come it does by default require you to click twice to close it though?
Hi xfacta,
What do you mean by that? It opens on one click and if you click on the image it shows next.
If you need further assistance please let us know.
Best regards,
Victoria
It was opening the image but to close the image you had to click the x twice to actually close it – so it was showing it like 2 separate images to close – if that makes sense. The code has fixed that though – but I just was curious to know why it was doing that in the first place.
Hi,
It looks like the prettyphoto script may have been getting enqueued twice, which is why Nikko dequeued the initialization. It code have been a bug or simple coding error.
Best regards,
Jordan Shannon
Ok thank you for that explanation :-)
You can close this ticket now – thanks allot.
Hi,
No problem at all. If you need additional help, please contact us here on the forums.
Best regards,
Jordan Shannon