Okay
  Public Ticket #2383913
Desactivate lightbox system of the theme
Closed

Comments

  • Loic started the conversation

    Hi,

    I would like to deactivate or change the code of the lightbox system of your theme to make a lightroom gallery from a single link. 

    What's the code for the lightroom system? Is it Magnific Popup? I would like to deactivate the image auto popup to change the system or have access to modify it so I can with a single LINK <a href=""> open a custom gallery with it.

    I know that I can do it with FancyBox. 

    Thanks for your futur help.

    Loïc

  •  675
    Neuron replied

    Hi Loic,

    The class that we initialize the magnific popup is called. 

    h-lightbox-link

    As how to destroy the magnific popup, please read this comment.

    https://github.com/dimsemenov/Magnific-Popup/issues/645#issuecomment-96622789

    If you need further help, please let me know.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  • Loic replied

    Thanks for your help. I would like to deactivate Magnific Popup so I could use fancybox where I know I can do a single link to open a lightbox gallery. I tried your link but it's not working ;-( The popup still appear with the code. 

  •  675
    Neuron replied

    Hi Loic,

    Hi Lecantin,

    Sorry, for the late reply. You can add this hook, it will remove and dequeu the scripts & styles of magnific popup. Add this on your functions.php of the child theme

    function project_dequeue_unnecessary_styles() {
        wp_dequeue_style( 'magnific-popup' );
    }
    add_action( 'wp_print_styles', 'project_dequeue_unnecessary_styles' );
    function project_dequeue_unnecessary_scripts() {
        wp_dequeue_script( 'magnific-popup' );
    }
    add_action( 'wp_print_scripts', 'project_dequeue_unnecessary_scripts' );

    Feel free to ask for anything you need.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.