-
AuthorPosts
-
April 18, 2016 at 10:22 pm #616841
Hello,
I just bought your theme and it is awesome!
But I have a problem with lightboxI have two that open lightbox in the shop
if I rename the folder prettyPhoto it works but I have error in google consol. So it’s not the right way
wp-content/plugins/woocommerce/assets/jsThanks for your help
April 19, 2016 at 12:07 pm #617312Hi,
I just found this. https://wordpress.org/support/topic/how-to-disable-lightbox-on-woocommerce-23
//DISABLE WOOCOMMERCE PRETTY PHOTO SCRIPTS add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 ); function my_deregister_javascript() { wp_deregister_script( 'prettyPhoto' ); wp_deregister_script( 'prettyPhoto-init' ); } //DISABLE WOOCOMMERCE PRETTY PHOTO STYLE add_action( 'wp_print_styles', 'my_deregister_styles', 100 ); function my_deregister_styles() { wp_deregister_style( 'woocommerce_prettyPhoto_css' ); }
The person to the same problem as me and also uses the theme enfold.
Is this the right solution?
Is there ‘is another way?
- This reply was modified 8 years, 8 months ago by Audiolia.
April 19, 2016 at 7:00 pm #617620April 20, 2016 at 2:09 am #617858Hi!
Please go to Enfold/js/avia.js and find
exclude : '.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',
and change it to
exclude : '.template-shop, .template-shop a, .noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',
Best regards,
YigitApril 20, 2016 at 7:22 am #618021Hi,
Thank you but it does not work.
Is it possible to place this change when operating in the child theme. If yes, how?
(I replaced the previous code in the functions.php file of the child theme pending.)
April 20, 2016 at 9:33 pm #618717Hey!
Please add following code to Functions.php file of your child theme in Appearance > Editor
function wp_change_aviajs() { wp_dequeue_script( 'avia-default' ); wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); } add_action( 'wp_print_scripts', 'wp_change_aviajs', 100 );
and move modified file inside /js folder
Do you mind creating a temporary admin login and FTP logins here privately so we can look into it?
Cheers!
YigitApril 24, 2016 at 2:20 pm #620812Hi,
I did not understand your solution.
I left my solution in place.
I joined you an ftp account and adminBest regards
April 26, 2016 at 2:48 pm #622174Hey!
put the code Yigit provided to you inside your functions.php. If you use a child theme then you can put it inside your child theme instead. Let us know when you are ready and still need help with the issue.
Best regards,
AndyApril 26, 2016 at 2:57 pm #622189Okay it works but it delete your lightbox.
The remaining one is ugly. And that’s the one I want to delete.Otherwise the code I use works well. My main question was whether the code was good and if I could use it.
April 26, 2016 at 3:13 pm #622220oops!
This code does not work at all.
The theme has a lot of problems.
– Google map no longer appears.
– Some css no longer works.
– The content of certain page will not appear anymore either.April 29, 2016 at 11:48 am #624282Hi,
Did you create a folder called “js” in the child theme and moved the avia.js file inside after adding the code? The code moved the script path so if you didn’t create the folder and files, it will break the theme.
Best regards,
IsmaelMay 1, 2016 at 9:16 am #625273ok, it addresses the issue of off-topic. But it does not I always change both lightbox.
The only thing that works is the code below it.
But it does not bother me to use, I just wonder if this is a good way.//DISABLE WOOCOMMERCE PRETTY PHOTO SCRIPTS add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 ); function my_deregister_javascript() { wp_deregister_script( 'prettyPhoto' ); wp_deregister_script( 'prettyPhoto-init' ); } //DISABLE WOOCOMMERCE PRETTY PHOTO STYLE add_action( 'wp_print_styles', 'my_deregister_styles', 100 ); function my_deregister_styles() { wp_deregister_style( 'woocommerce_prettyPhoto_css' ); }
May 2, 2016 at 11:42 am #625665 -
AuthorPosts
- You must be logged in to reply to this topic.