Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #859590

    Hi, I’m not using enfold’s built in lightbox (because it’s old and outdated…), so I unchecked “Lightbox Modal Window” in Enfold’s settings, and implemented another lightbox.
    Looking at the source code though, I still see that the theme loads the css and JS files to magnific popup, but I don’t think these are needed anymore.
    Are they still there for a purpose, or did you just forget to disable them and I can dequeue them?


    Hey Tom,

    Thank you for using Enfold.

    If you disabled the theme’s lightbox, you can dequeue the lightbox script because it’s not needed. What is the name of the current lightbox that you’re using?

    Best regards,


    I am using photoswipe, it’s mobile and touch friendly, unlike magnific.
    I will dequeue magnific, but I don’t think the magnific CSS and JS should even be loaded once your default lightbox is disabled. Will you fix this in the next release? If yes, than I won’t dequeue now.


    Hi Tom,

    It’s there in the folder, what do you mean loaded, like you have a call to load the script? Could you please give us a link to your website, we need more context to be able to help you?

    Best regards,


    Hi, I think there is a misunderstanding.
    In short:
    1. Enfold uses the Magnific lightbox as it’s built in lightbox script.
    2. When someone unchecks the “Lightbox Modal Window” in Enfold’s settings, the JS and CSS to Magnific lightbox should not be enqueued by Enfold, since they are not being used any more.

    The problem is that the script is still being enqueued by Enfold, using resources unnecessarily.

    So if you look at the source code for, you can see the JS and CSS of Magnific loading, despite the fact that it should be turned off:
    Line 62:
    <link rel='stylesheet' id='avia-popup-css-css' href='' type='text/css' media='screen' />
    Line 525:
    <script type='text/javascript' src=''></script>

    Do you understand now?

    The Magnific lightbox CSS and JS files should not be loading at all, if it’s turned off from Enfold’s settings.

    Will you fix this in the next release?




    Yes, that’s correct. We’ll report the issue. For the meantime, you can remove it by using the following functions in the child theme’s functions.php file.


    Best regards,

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