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 longer shows on the back-end or front-end. If an administrator or editor makes the changes and saves it, the iframe stays. Besides changing the user role to editor, how do I prevent the iframe from disappearing? I tried having …
Category: Web

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. I refresh the page and the video disappears. I go to the page editor and the embedded code for the video has been removed. Please can someone tell me why this is happening? I have tried to research it …
Category: Web

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: "embed code" does not mean using the embed tag, but that is what the iframe code is called to embed the map on a web page. I have attempted with Genesis Custom Blocks but it will not render the …
Category: Web

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 option, I am getting the blank screen as shown below in an image but when I open in a new window or tab, it works. On checking console, I am getting the following error (when clicking on View Details fails to open on the same page): …
Category: Web

On click load iframe

I have this html <a href="#1647278006925-e8321147-313b" data-vc-accordion="" data-vc-container=".vc_tta-container"><span class="vc_tta-title-text">LISTEN</span></a> that is printed in my page and opens an accordion with an iframe in it. The iframe: <iframe id="myiFrame" class="stop-lazy" data-src="https://some.iframe" frameborder="0" allowtransparency="true" style="width: 100%;min-height: 150px;"></iframe> I am trying to create a jquery code that will load the iframe only when the user click on the link. So i have tried to set the below script in the footer.php: <script> $(".vc_tta-title-text").click(function(){ var iframe = $("#myiFrame"); iframe.attr("src", iframe.data("src")); }); </script> but it …
Category: Web

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 digital certificate in a real estate website that have a 360° virtual tour to departments in sale, the problem is that webpage is actually an embedded external insecure website, inside a iframe element, and the replay of Firefox is "Your connection is not …
Category: Web

wp_insert_post iframe missing

In my install, I use one custom page. Here I put one text field and the fck editor. This is for the title and the content. I need to insert this into a page. I use the following code $my_post = array( 'post_title' => $_POST['title'], 'post_content' => $_POST['content'], 'post_type' => 'page', 'post_status' => 'publish', 'post_author' => 1, 'menu_order' => 10, ); // Insert the post into the database $post_ID = wp_insert_post( $my_post ); In the content field, I insert the …
Category: Web

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 people visit the site they see a cool interactive piece instead of just a static image. Does anyone here know how to do that? I'm comfortable doing some hand coding, but I'm pretty unfamiliar with php. For reference, the site I'm …
Category: Web

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 class="aatest1">This is a test</span><br> <?php echo 'This is my iframe content<br>'; var_dump($_GET); } wp_die(); ?>
Category: Web

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" height="800"> I want the "UNIQUECODE" in the iframe to populate based on the browser URL (my site is example.com): http://www.example.com/iframepage?UNIQUECODE Is this possible with the WordPress block editor and/or with an update to functions.php?
Category: Web

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 pages at a text editor manually and upload them with all the associated assets in their own folders, completely outside of the WP ecosystem. The problem is that I'm having big trouble by adding anything outside the core WP folders in the hosting I'm …
Category: Web

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 replace an iframe: add_action('wp_ajax_myAction', array($this, 'myAction_ajax_handler')); public function myAction_ajax_handler() { echo time(); wp_die(); } When the admin page is displayed, I have this: echo '<body onLoad="loadDoc();">'; echo '<div id=myDiv></div>'; ?> <script> function loadDoc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { …
Category: Web

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 keyboard disappears again. This makes it impossible to enter details into the form. Is there a way to stop WordPress from refreshing an iFrame? https://ubleisure.co.za/ It is the first form on the main page and needs to be able to work correctly on mobile.
Category: Web

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). Unfortunately, they were unable to help me figure it out. The embed code is: <iframe src="https://www.hostingsite.com/../embed/?u=[get_user_id_code_should_go_here]" width="100%" height="500" frameBorder="0" allowfullscreen></iframe> where the ?u parameter should display the user id. I was told that the way I would know it works is if …
Category: Web

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 messages on my site and it is displayed accordingly in the dashboard widget on client sites. Now I do this by adding a widget with an iframe. But this seems to me a bad decision. In addition, the fixed height in the iframe …
Category: Web

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 only url source from specific domain? Any idea?
Category: Web

Give Author users the right to embed

I'm trying to allow "author" users to embed in posts. I (the administrator) can iframe, embed, etc...., but authors can not. Can someone show me to give authors 'just' the ability to embed and iframe in posts?
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.