Tagged: , ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #856716

    Hi,
    I tried to create a link to open a modal window… It’s working from the content of a page, but not from a link in the top menu… it open the link as a normal page, not in a modal window.

    You can try here:

    https://ecorustico.com/

    And here

    https://ecorustico.com/prueba

    Using this to create the link:

    <a class="open-popup-link" href="//ecorustico.com/wp-content/themes/ecorustico/puntodeventa.php?iframe=true">popup modal</a>

    What am I missing?

    Regards,

    Antonio

    #856932

    Hey Antonio,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #857140
    This reply has been marked as private.
    #857593

    Hi antoniolite,

    I see that the Editor menu in the Appearance menu is disabled. Where did you add the link?

    Best regards,
    Victoria

    #857641
    #857689

    Hi antoniolite,

    The thing is that the classes for the lightbox are added to the li element, not to the link itself.
    You could try to add the link in the telephone field in the header, you can put html in there.
    Try this code

    
    <a class="open-popup-link mfp-iframe lightbox-added" href="//ecorustico.com/wp-content/themes/ecorustico/puntodeventa.php?iframe=true">popup modal</a>
    

    Best regards,
    Victoria

    • This reply was modified 6 years, 5 months ago by Victoria.
    #857699

    Hi

    thanks for your help, I did not think about that option, but it’s not working

    I added a HTML link in that field, it shows on header but modal window is not working, it opens as a normal link. It’s strange that in the post content is working, but not in the header.

    I guess I will think a different way to add this feature.

    #857957

    Hi antoniolite,

    You could also try to put this code directly into the header.php, but better use a child theme for that. But I’m not sure it’s going to work there.

    Best regards,
    Victoria

    #883184

    Did you ever got this to work?
    Lightbox from menu works
    Lightbox from topmenu doesnt.

    I followed this post and it does work for the main menu. But when I put the main-menu in the top – it stops working.
    https://kriesi.at/support/topic/how-to-properly-open-video-in-lightbox-from-a-dropdown-menu/#post-49035

    #883190

    I did it work from topmenu with this plugin:

    In top menu, just a link with plain HTML and a bit of custom JavaScript

    <script type="text/javascript">
    jQuery('#puntodeventa').click(function(e) {
    	e.preventDefault()
    	modal_dialog_open();
    });
    </script>

    Hope it helps

    #883802

    Hi,

    Thanks for sharing @antoniolite, much appreciated :-)

    Best regards,
    Rikard

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