Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #845546

    Refering to this post here
    https://kriesi.at/support/topic/contact-form-in-pop-up-prettyphoto-issue/#post-304173

    I got this to work however if I wanted to have 3 different links opening their own text popup, what would I need to change..

    Added code below for others to follow..

    --The Enfold uses MagnificPopup as default lightbox plugin. You can add this on functions.php:
    
    function popup_inline() { ?>
    <script type="text/javascript">
    jQuery(window).load(function(){
    	jQuery('.open-popup-link').magnificPopup({
    	  type:'inline',
    	  midClick: true // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href.
    	});
    });
    </script>
    <?php }
    
    add_action('wp_head', 'popup_inline');
    
    --Then use this on a text block:
    
    <div id="test-popup" class="white-popup mfp-hide">
    <p>PLACE CONTENT HERE</p>
    </div>
    
    <a class="open-popup-link" href="#test-popup">Show inline popup</a>
    
    --Then Add this on Quick CSS or custom.css:
    
    .white-popup {
      position: relative;
      background: #FFF;
      padding: 20px;
      width: auto;
      max-width: 500px;
      margin: 20px auto;
    }
    --Remove browser cache then reload the page a few times.
    • This topic was modified 2 years, 10 months ago by  wealthyone.
    #845549

    Ok I think I worked it out.
    I changed the id=”test-popup” to id=”my-popup”
    And
    href=”#test-popup” to href=”#my-popup”
    on the 2nd ( and 3rd I changed again) to make the 2nd and 3rd pop ups work

    is this all that is needed??

    • This reply was modified 2 years, 10 months ago by  wealthyone.
    #845567

    Hi!

    Hmm… The original id="test-popup" and href="#test-popup" should have worked. But please remember that you cannot have two elements having the same ID. Did you perhaps have two elements with the ID test-popup?

    Best regards,
    Sarah

    #845568

    Yes I did.
    thats why I added the second msg to clarify I fixed it by changing the ID name..

    #845581

    Hi,

    Do you still need help then, or has this issue been solved?

    Best regards,
    Jordan Shannon

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.