I have been trying to embed a website into a private page, and have tried out the "embed" and "iframe" tags, but as soon as I update the changes it redirects to the embedded site. I read more about the subject and found out that if I used the sandbox option, then I could prevent that from happening:

<iframe src="https://url.com/" width="100%" height="650" name="disable-x-frame-options" sandbox="allow-forms allow-popups allow-pointer-lock allow-same-origin allow-scripts"></iframe>

Even though the page itself is stable and the iframe is working perfectly, the editor keeps redirecting, too quick for me to make any further changes to it. Is there any way of preventing the page's editor from doing this?

  • When you say the editor, which one are you referring to? The block editor? The classic editor? Or some other editor from a plugin? Keep in mind you can't put <iframe> or <embed> tags directly in WP content, super admins have the unfiltered_html capability, but it's still a super bad idea to put those tags in directly. Use a shortcode or OEmbed instead – Tom J Nowell Feb 17 '19 at 3:19
  • My bad for not clarifying it further. I meant the "Edit Page" editor, which is most probably called the "Post Editor". – omar.may Feb 17 '19 at 3:43
  • Been trying to use shortcode as well as OEmbed, but they are both causing redirects... – omar.may Feb 17 '19 at 4:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.