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

    Using Enfold, I created a secondary menu with three custom links in it. I need the third one to open in a lightbox. Example:

    Phone number (custom link): links to tel:1234567890
    Apply (custom link): links to external site ex: google.com
    Request (custom link): Links to a page : /request-information?iframe=true

    I’ve then added this to the child-functions file:

    // custom script
    add_action( ‘wp_footer’, ‘ava_custom_script’ );
    function ava_custom_script() {
    ?>
    <script type=”text/javascript”>
    (function($) {
    function b() {
    $(“#header_meta a”).magnificPopup({
    type: ‘iframe’,
    mainClass: ‘avia-popup mfp-zoom-in’,
    });
    }

    $(window).load(function() {
    b();
    });

    })(jQuery);
    </script>
    <?php
    }

    With this functions script added, it opens ALL three links in a lightbox. Without it, doesn’t open the third menu item in a lightbox.

    Question: What is needed to make only the third button open in a lightbox?

    Thanks in advance. You guys are the best.

    #1080129

    Hey CoreyNordwall,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1080183

    The top pink “Request info” button opens in a lightbox, the “phone number” and “apply now” which are normal links should not.

    #1081206

    Hi,

    Please try to replace #header_meta in your code with this ID instead: #menu-item-47

    Best regards,
    Rikard

    #1081401

    That’s it. You’re the best! Thank you.

    #1082477

    Hi CoreyNordwall,

    Glad that we could help :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Lightbox problem in secondary menu’ is closed to new replies.