Tagged: conflict, prettyphoto
-
AuthorPosts
-
August 13, 2015 at 7:07 pm #487378
Hello,
I am developing a site with Enfold theme where I’d like to include a plugin to add a wishlist to woocommerce, I was just trying YITH WooCommerce Wishlist when I came across a problem.
Apparently this plugin loads the prettyPhoto script, and despite your theme now using Magnific Popup for opening product images in a lightbox, in the file config.php inside the ‘config-woocommerce’ folder, I still see prettyPhoto tags being used, and that is causing my product galleries to open both lightboxes, the expected one with Magnific Popup and another prettyPhoto one on top of that.
I’m going to try preventing that wishlist plugin from loading prettyPhoto, but I guess you guys might like to know about this conflict and maybe do some changes to the theme to prevent these issues.
Best regards!
August 14, 2015 at 3:28 pm #487799Hi emotionalbrands!
Thanks for the notice. We can give you some code to exclude those images from the magnific script.
If you want to use the magnific script though then it would be best to disable the prettyPhoto in the wishlist plugin. We left those in there in case the user wanted to disable the magnific script and just use the Woocommerce default.
Best regards,
Elliott- This reply was modified 9 years, 4 months ago by Elliott.
August 14, 2015 at 3:34 pm #487805Hey, thanks for the quick reply.
Yes I prefer to keep using Magnific Popup as the lightbox for my product images, so I already added some code to my functions.php to dequeue prettyPhoto’s scripts.
I’m leaving my code for that here as reference in case someone else runs into a similar issue:
// Dequeue prettyPhoto function prettyphoto_dequeue_script() { wp_dequeue_script('prettyPhoto'); wp_dequeue_script('prettyPhoto-init'); } add_action('wp_print_scripts', 'prettyphoto_dequeue_script', 100);
Best regards,
José AlmeidaAugust 15, 2015 at 6:48 am #488127 -
AuthorPosts
- You must be logged in to reply to this topic.