Tagged: ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #616841

    Hello,

    I just bought your theme and it is awesome!
    But I have a problem with lightbox

    I 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/js

    Thanks for your help

    #617312

    Hi,

    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.
    #617620

    ???

    #617858

    Hi!

    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,
    Yigit

    #618021

    Hi,

    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.)

    #618717

    Hey!

    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!
    Yigit

    #620812

    Hi,
    I did not understand your solution.
    I left my solution in place.
    I joined you an ftp account and admin

    Best regards

    #622174

    Hey!

    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,
    Andy

    #622189

    Okay 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.

    #622220

    oops!
    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.

    #624282

    Hi,

    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,
    Ismael

    #625273

    ok, 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' );
    }
    #625665

    Hi!

    Yes, it is okay to use this code snippet. Glad you figured it out!
    Let us know if you have any other questions or issues :)

    Cheers!
    Yigit

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.