• Hi, I created a photo gallery grid on my home page. For each photo I want to create a popup linked to an internal post or page with slideshow, description and short similar items grid.
    I just activated easy-fancybox and I created my first popup using i-frame method.
    I would like to know if:
    1. the i-frame method would be the best way in this case;
    2. is there a solution to assign to each popup a new link. To be more clear, if on home page https://www.mysite.com I click an image called “product1”, when the popup shows up, the link in the address bar should change in https://www.mysite.com/product1.
    Is that possible?
    Thank you!

    • This topic was modified 2 years, 9 months ago by galix.
Viewing 5 replies - 1 through 5 (of 5 total)
  • 1. the i-frame method would be the best way in this case;

    Hi, I don’t think I understand what your case is. You are opening internal pages/post in the popup? Then yes, you’d need to use iframe mode for that…

    2. is there a solution to assign to each popup a new link.

    No, that would load the iframe content in the top frame.

    Thread Starter galix

    (@galix)

    Thank you for your reply. Yes, I am opening internal post/pages.
    About the link, it’s not even possible to get the original page url in the address bar ones the popup is opened?

    No, the address bar reflects the address of the parent page, not the iframed page.

    Thread Starter galix

    (@galix)

    Ok, just few last questions:
    1. how to open a lightbox on image click;
    2. how to hide header and footer of internal page using iframe method.
    Thank you very much for you precious support ??

    1. how to open a lightbox on image click;

    It depends… are you using the new block editor or do you have page builder plugin or Classic Editor?

    When using the new (default) block editor: Insert an image block and choose the image, then give that image the link (with the link button in the block toolbar) to your internal page. Next, switch the editor to the Code editor view (on the right side under the three-dots menu or by hitting Ctrl+Shift+Alt+M key combination) and then find the just inserted image block, it will start with <!-- wp:image. Then find inside it the <a href="..."> part that represents the just created link. Now modify that link to give ti the needed class name, like this <a class="fancybox-iframe" href="...">. Then switch back to the Visual editor (same as before) and hit Update or Save.

    2. how to hide header and footer of internal page using iframe method.

    There is a plugin called “Show Content Only” but has not been updated for a long time so it will not show up in your plugin search results. I’m not sure there is another/newer plugin that does a similar thing…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘assign to each popup a new link’ is closed to new replies.