If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #293672


    I hava a inline element inside this code:

    <div id="ok" class="white-popup mfp-hide">

    I would like to open the same directly in URL in address bar. I using the address in the “private content”, but the same is not loading the popup.

    What is the problem?



    Hey CloudChoice!

    Thank you for using the theme.

    I’m sorry but what do you mean by “opening inline element in the address url”? Can you please explain it a little bit further?




    I’m talking about opening a magnific popup element directly in the url or the deeplink of element.

    For example: image.jpg opened would be site.com/#image.jpg and going to that URL would trigger the Magnific-Popup to open right off with that image.




    Please read the documentation of magnific popup: http://dimsemenov.com/plugins/magnific-popup/ . You can’t easily open a modal box without some custom code. I did a quick test on my website though and if a paste following code into a “Code” element:

    $(function () {
    		type: 'inline',
    		preloader: false,
    		focus: '#username',
    		modal: true
    	$(document).on('click', '.popup-modal-dismiss', function (e) {
    .white-popup-block {
    background: #FFF;
    padding: 20px 30px;
    text-align: left;
    max-width: 650px;
    margin: 40px auto;
    position: relative;
    <a class="popup-modal" href="#test-modal">Open modal</a>
    <div id="test-modal" class="mfp-hide white-popup-block">
            <h1>Modal dialog</h1>
            <p>You won't be able to dismiss this by usual means (escape or
              click button), but you can close it programatically based on
              user choices or actions.</p>
            <p><a class="popup-modal-dismiss" href="#">Dismiss</a></p>

    I can reproduce the demo content of the magnific popup website.




    Ok. I agree, but the fact is:
    Are you able to open this modal in a deep link?

    In other words, open the popup direct typing the URL in the address bar?




    Not without some additional code which checks the hash values and triggers the modal box if necessary. I guess a skilled js developer can do this with 1-2 hours of work but it’s just a rough estimate. If you need help with it please hire a freelancer – i.e. from http://studio.envato.com/




    I get it. Appreciate the attention.


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

The topic ‘Open inline element directly in the address bar (url)’ is closed to new replies.