How do I make links work so they open in the iframe?
My setup is like this:
- I have my WP installation in a folder (wp) off the root (www.legstadaleit.com/wp)
- I have my iframe content (what I want to appear in the iframe) also in an iframe off the root (www.legstadaleit.com/tng)
My current shortcode is like this:
And that works perfectly if I f.ex. put it in a page.
BUT....when I link directly to a page that is in the tng folder, like f.ex. removed link ;tree=, it opens outside the iframe.
I have looked at your examples, but unfortunately I don't understand how I should set my links up so that they open within the iframe.
If you go to f.ex. removed link and click on one of the photos of the men there, you can see exacly what I mean.
I hope you can help!
the links are removed as you are a new user.
There you see how you can modify links targets dynamically.
Best regards, Michael
I have purchased support now. I really hope you can help me fix this soon, my website depends on this working.
what is your problem? changing all links by using "a" as parameter should work fine if you are on the same domain.
Hi Michael, sorry for the late reply.
I think I was not doing this iframe thing correctly. Previously I had made an wp page with an iframe for each page I wanted to display on my webpage. But then I realized that was not a sensible thing, so I just created one page with the iframe content.
I also figured out how to add the iframe url to the wp url so now it is possible to bookmark content within the iframe. I think that has mostly solved my problem since I investigated the issue and found (am I correct?) that google will not index the iframe content directly but indexes the iframe content inside the wp content like it should be. That means that search results will give links that show the full content, both the wp and the iframe inside. So maybe I don't need this functionality after all?
My shortcode now looks like this (do I need "https" in the scr?):
I have however encountered a new "issue" and that is how do I track the traffic inside the iframe f.ex. with Google Analytics or Matomo Analytics? As soon as a user clicks the webpage that has the iframe, it stops tracking it seems.
I hope you can help me with these questions.