Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [iframe]

A full webpage can be loaded into another webpage using an iframe. WordPress uses iframes frequently in its own interface. Using iframes in a plugin/theme also comes with certain perks.

Filter by
Sorted by
Tagged with
0 votes
1 answer
175 views

YouTube embeds Cross-Origin Request Blocked (CORB) error

I am new to the WordPress world, please bare with me. On my website have embedded some YouTube videos using the video block. I am seeing this error in the console: Cross-Origin Request Blocked: The ...
kocjs's user avatar
  • 23
0 votes
1 answer
67 views

Including plain text URL to post on same site is converting the URL to an embed

If I paste a plain text link (non-hyperlinked) to a post on the same site (using Classic Editor) it converts the post's URL to an iFrame embed. For example if my site is https://mysite.local and the ...
Gavin's user avatar
  • 384
0 votes
1 answer
937 views

Injecting CSS into Iframe

I have added an iframe to my website. Within the I-Frame is an area which is not required and I would like to hide. I have tried to inject CSS into the i-frame using Functions.php add_action( '...
PaulMcF87's user avatar
  • 131
0 votes
1 answer
586 views

How do I modify each instance of setcookie?

I have an internal WordPress site that I'm trying to embed via iFrame. Currently, I'm stuck on: Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress. ...
Kermit's user avatar
  • 155
0 votes
1 answer
25 views

iframe works for one C-Panel folder but not another

I have successfully embeded an iframe in Wordpress (via Elementor) that displays a Unity3D game. The game is located in c-panel > file manager at: https://wordpress-staging.zafflower.com/...
Zaffer's user avatar
  • 1
1 vote
1 answer
909 views

How To Add CSP frame ancestors in Wordpress Website? [closed]

I'm trying to add Content Security Policy (CSP) frame ancestors in .htaccess file to prevent our website from getting iframed on other websites. Following is the code: <IfModule mod_headers.c> ...
Vaibhav Singh's user avatar
1 vote
0 answers
268 views

What purpose does /embed/ URL have and how to avoid SEO problems?

I've noticed this with many WordPress projects (and clients) over the years so I thought it was worth a public thread. When you interlink a post/page that has embedding enabled, the iframe source will ...
Jesse Nickles's user avatar
1 vote
0 answers
77 views

How can I create iframe/embeddable content from my WordPress site?

I have a Google map on my site that I use to plot out various points of interest as it relates back to my blog. I have had a few people suggest to me to create an embeddable version of the map so they ...
zeropsi's user avatar
  • 101
0 votes
0 answers
321 views

How do I include and iframe in a Custom Block?

Given the html block tag I can include and iframe from Google My Maps in my post. I need to create a block where the client can paste the URL from the embed code and the block render the iframe. note: ...
mike's user avatar
  • 113
0 votes
1 answer
830 views

On click load iframe [closed]

I have this html <a href="#1647278006925-e8321147-313b" data-vc-accordion="" data-vc-container=".vc_tta-container"><span class="vc_tta-title-text">...
Honoluluman's user avatar
0 votes
0 answers
141 views

How to disable login in iframe which is hosted in same domain?

I want to disable auto login on iframe which is embeded in wordpress dashboard page. I have page(/booking) which uses login info to prefill customer data. I want to embed that page in iframe in wp-...
Mady M's user avatar
  • 1
0 votes
1 answer
384 views

How do I use an iFrame for my header in Wordpress twenty seventeen?

I'm pretty new to Wordpress, and I'm currently trying to make a site using the twenty-seventeen template. My ultimate goal is to use an iFrame of a sketch I made in p5 as my header media, so that when ...
topherbb's user avatar
0 votes
0 answers
51 views

If I leave out the wp_die() in the testiframe function I get the '0' appended to my output. If I put it in, the page w/ iframe linked to it crashes

add_action('wp_ajax_ajtestiframe','testiframe'); <?php function testiframe() { ?> <head> <style> .aatest1 {color:red;} </style> </head> <span ...
Gary's user avatar
  • 1
0 votes
0 answers
50 views

Pass URL to iframe in WordPress Block

I have a WordPress site with an iframe that displays custom content from an external site. Here is my iframe code: <iframe src="https://www.targetsite.com/UNIQUECODE" width="800"...
jvchappy's user avatar
0 votes
0 answers
36 views

A way to upload old html pages with all its assets via WordPress admin and to add a fixed menu on top of those (a la Wayback Machine)

Inside a WordPress website I manage at a custom hosting, I want to have a few joke websites that looks like personal Geocities pages from the 90s, with animated gifs and all. Generally I edit these ...
peroyomas's user avatar
  • 329
0 votes
1 answer
242 views

WP.org acceptable iframe alternative

Question edited: I'm working on an alternative to iframes because WP.org balks at them and tends to reject plugins that have them (I know this from experience) So, here's the code I have to try to ...
uPrompt's user avatar
  • 172
0 votes
0 answers
152 views

How to stop iFrame form from reloading on mobile?

I am loading a form via an iFrame. On a desktop it works and submits correctly. However on a mobile device once the user's keyboard pops up then the iFrame refreshes, clearing the form and the ...
Ocean Knight's user avatar
0 votes
0 answers
304 views

Include User ID in iFrame URL

I seem to have hit a roadblock trying to figure out how to append the user ID to an embedded iFrame url address. I am using a third party app that tracks unique users (and invoices me accordingly). ...
Rok Palčič's user avatar
0 votes
1 answer
20 views

A message to clients in the dashboard widget received from another site

I would like to display various notifications on the dashboard of client sites. This is not a list of posts, just a message. The message itself is located on my main site. That is, I change the ...
Sergey Pervushin's user avatar
2 votes
2 answers
7k views

Which HTTP headers to use for subdomain <iframe> embedding?

I have a Wordpress site hosted on LightSail (which uses bitnami). The domain is https://example.com On a subdomain https://sub.example.com I have another server running. On this server, I want to ...
nbz's user avatar
  • 131
0 votes
0 answers
63 views

How can I use an iframe element as my header media?

I am currently using the twenty-seventeen theme, which allows me to display a youtube video on the homepage and images on other pages. Instead of a youtube video, I wish to display an iframe on the ...
Rowan Richards's user avatar
1 vote
0 answers
428 views

Woocommerce: Can't put items in cart in iframe and on iphone

I have the following problem: I have a Wordpress page that contains a Woocommerce store. This page is embedded in an iframe on a typo3 page. If I visit the typo3 page with Google Chrome it is not ...
quikina's user avatar
  • 23
0 votes
0 answers
46 views

How to add data behind a login via iframe

so I'm working on on a WordPress site, but I want to pull a graph from another site. However, I need to be logged into the website in order to view the graphs/data. I'm very new to web development; ...
Jerome Ariola's user avatar
1 vote
1 answer
71 views

metabox wordpress show in frontend

Hello I have a metabox field called name this returns an iframe that I have placed but it returns all the code of the iframe and it was not executed. What is missing in my code to show it in the ...
Stymark's user avatar
  • 37
0 votes
1 answer
454 views

Can't Listen to KeyDown in TInyMCE Iframe (jQuery) and Pass it to Parent HTML FORM

I am trying to build an HTML form with TinyMCE textarea such that on Clicking Ctrl+S, it submits the form, by clicking the SUBMIT buton of form. I am using jQuery, here is the KeyDown jQuery(...
user avatar
0 votes
1 answer
552 views

Disable automatic embed links

Is there a way on current wordpress versions (5.2..), to turn of the automatic embed links(wp-embed.min.js), that will turn an url into an iframe? I have tried plugins, snippets, functions.php ... it ...
Fernando Souza's user avatar
4 votes
0 answers
6k views

How to fix samesite attribute in wordpress for chrome errors?

I have several wordpress sites that run on a rhel7 box that I admin. All of the sites use a custom SSO plugin that I wrote. Today I was told that other sites were having issues accessing one of ...
STing's user avatar
  • 591
0 votes
1 answer
3k views

How to change src to data-src for iframe inside WP content?

I need to change src to data-src for iframes inside Wordpress content and add class lazy. I was trying this: function iframe_image_lazy_load($the_content) { $thecontent = get_the_content(); ...
D_P's user avatar
  • 143
1 vote
4 answers
2k views

How to save iframe tag into a post?

I've noticed that when I embed an iframe into a post then save the update, the iframe will not be saved. It seems to be a security feature, but how can I embed the iframe anyway? and set it to accept ...
simo's user avatar
  • 131
0 votes
0 answers
112 views

How to use wp_filter_oembed_result?

I have a video iframe it's can be youtube , vimeo etc $iframe = get_field($field, $id); if(empty($iframe)){ return; } preg_match('/...
user avatar
0 votes
0 answers
117 views

How do I keep my iframes responsive and scaled to fit their container?

This is a WordPress core question and only a CSS question as a byproduct. I am designing a theme using bootstrap. Everything looks exactly as I want it to with one exception - links embedded from my ...
Matthew Brown aka Lord Matt's user avatar
1 vote
0 answers
61 views

Cannot add iframe in a blocktext

I want to add an iframe in a block text on the Text tab as follows : But when I apply the updates the iframe disappears, it's like I have never added this part of code : <iframe src="xxxx" width=...
zakaria mouqcit's user avatar
0 votes
2 answers
3k views

iFrames when using custom shortcode, ACF and Elementor only renders alternate ones

This is a rather specific and weird issue that is really bothering me now. Here's the setup. - I'm using Elementor Pro and I've created a single page template. - I have four shortcode widgets on ...
Akhil's user avatar
  • 113
-1 votes
1 answer
155 views

IFrame Shortcode plugin - issue

[iframe src="https://www.quora.com/" data-no-lazy="1"] Hey guys I'm trying to add external webpage to wordpress. I'm using "Flyn San" plugin for that but its not working properly. I have attached the ...
Danish's user avatar
  • 1
5 votes
2 answers
5k views

Wordpress Gutenberg Embed Blocks Are Not Responsive

I'm building a custom theme for a client's website and want to allow them to use embedded content in their posts (Youtube videos, Facebook posts, Twitter feeds, etc.) Typically, I've taken to severely ...
Riley Cook's user avatar
0 votes
0 answers
57 views

Using an iframe for a form help

I need to add an html form to my homepage so I have added an iframe using raw html. Everything works correctly on the desktop but when I try to use it on mobile it gets messed up. Instead of our ...
Nicole's user avatar
  • 1
1 vote
1 answer
645 views

VB.net and WordPress

I run a WordPress website that often has posts with some JavaScript, usually for various calculators. For example, I might use JavaScript to allow a visitor to convert inches to mm. That's a basic ...
MrSamuel's user avatar
1 vote
2 answers
11k views

External content won't load in iframe in Safari

I'm trying to load external content into an iframe, & it is working in Chrome & Firefox, but it won't load in Safari. In Safari I get the error message: Refused to display 'my_content' in a ...
megseoh's user avatar
  • 31
0 votes
1 answer
350 views

Iframe is not working for www.example.com/my-account

Iframe is working fine for www.example.com, But its not working for www.example.com/my-account I followed few tricks, Like: adding these codes: remove_action( 'login_init', '...
Tazminur's user avatar
0 votes
1 answer
1k views

Allow insecure embedded content in a SSL secured website

(After some research I think the straight answer is "no, your SSL secured website won't allow to embed insecure content" but I have to ask just to be 100% that is impossible.) I just activated a SSL ...
abiyi's user avatar
  • 101
1 vote
1 answer
215 views

Side effects of Script and Iframe in post

I am writing a post on HTML. Afcorse the post will have Codes in it. So for showing results in the post, I am taking help of JSFiddle, by embedding results of the code. JSFiddle gives two methods for ...
nitasot's user avatar
  • 11
0 votes
1 answer
295 views

Load oEmbed iframe within ajax call

I'm trying to load oembed shortcode loaded via ajax. The problem is that the oembed shortcode seems to work as I have a blockquote instead of the instagram link. However the blockquote is not ...
leopold_pepichoc's user avatar
0 votes
2 answers
15k views

How to solve Blocked a frame with origin from accessing a cross origin frame error in wordpress?

I am working on a WordPress website in which there are a lot of wordpress plugins installed. The plugins installed on the wordpress website has the following options: When I click on View details ...
john's user avatar
  • 57
0 votes
1 answer
511 views

Iframe scrolls to middle of the page on load in Firefox [closed]

I have a website www.negovista.com with an iframe on the middle of the page. In Firefox the page scrolls to the middle of the page when I load the page. Any way to avoid this? Thanks for any ...
flemmingha's user avatar
0 votes
1 answer
891 views

Youtube iframe embed keeps disappearing from page

I am trying to embed a video on my homepage. I add the embed code from YouTube and paste it into a custom html blog on the gutenberg editor. I click update and check my website and the video is there....
lomomeg's user avatar
2 votes
1 answer
5k views

Iframe disappears when author updates page

If a user has an author role and is listed as the author of a page, when they make changes to the page and click update, the changes are made but the iframe that was in the wysiwyg disappears and no ...
Sensoray's user avatar
  • 121
2 votes
1 answer
260 views

How to ensure the visual editor doesn't ruin my iframe?

I have this iframe and JavaScript embedded in a post: <iframe onload="fa_iframeresize.do(this);" src="https://example.com/calc.php?tp=dif&cl=beleggen&h=1&wf=19370&country=NL" ...
the's user avatar
  • 1,477
0 votes
0 answers
51 views

How to completely prevent WordPress from destroying/modifying my shortcode outputs?

Here I have written a (pretty safe) shortcode for embedding iFrames in WordPress: add_shortcode( 'r2o_iframe', 'r2o_display_iframe' ); function r2o_display_iframe($atts) { ob_start(); $src ...
Blackbam's user avatar
  • 545
0 votes
0 answers
837 views

iFrame onLoad in custom Gutenberg block

I have this code that I am trying to rewrite for Gutenberg block: <script type="text/javascript"> <iframe onload="javascript:resizeIframe(this);" src="/...
ivanacorovic's user avatar
0 votes
1 answer
334 views

what is the method to echo class attribute inside the i tag? [closed]

I am having line like below and it works fine. echo '<li><a href="' . get_term_link( $term->slug, 'amenities' ) . '"> <i class="fab fa-safari" style="font-size:25px;color:#981111"&...
user avatar