This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

launch a lightbox pop-up from menu button

  • Creator
    Topic
  • #10989
    corante
    Participant

    HI Jason,

    Is it possible to launch a lightbox pop-up from a menu button? For example, a menu button labeled “Contact” that normally links to a contact page — could instead pop-up the contact form in a lightbox when you click. Thanks!
    – Jorge

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #11013
    Jason Bobich
    Keymaster

    I guess in theory, using the Magnific Popup lightbox integration in Swagger 2+, you could do it.

    First you’d have to get the HTML for what you’re going to display hidden in the HTML markup of the page. It’s going to be hidden, so you could really hook it to just about anything from your Child theme’s functions.php:

    http://dev.themeblvd.com/tutorial/actions/

    http://dev.themeblvd.com/tutorial/primary-framework-action-hooks/

    function my_contact_form() {
    	?>
    	<div id="myPopup" class="white-popup mfp-hide">
    		Your contact form...
    	</div>
    	<?php
    }
    add_action( 'themeblvd_before', 'my_contact_form' );

    And then under Appearance > Menus, you’d need to give the menu item the CSS classes “themeblvd-lightbox mfp-inline” and link the menu item to the ID of the popup which would in this example would be #myPopup.

Viewing 1 replies (of 1 total)
  • The forum ‘Swagger Responsive WordPress Theme’ is closed to new topics and replies.