Embedding an iframe not working in Widget Custom HTML or Raw content

I tried embedding an iframe in a Widget Custom HTML area and tried a raw content, and neither are showing. When I click the page that is embedding it works, and I can see the JS i added, but I don’t see my form. Its supposed to see a form in the navy form, but niether is showing.

Is there an issue with the classic Raw content and/or Custom HTML widget area?

but the embeded page form does work (see below) but not in my page.

Hi There,

Thanks for writing in! The issue seems to be with your Javascript added. Could you please try adding your Javascript using child theme’s functions.php file. To setup a child theme, please refer to our guide here (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57).

add_action( 'wp_footer', 'custom_page_script', 10 );

function custom_page_script(){
   if ( is_page(17) ) {
      echo '<script src="http://www.example.com/path/to/javascript.js">';
      echo '<script src="http://www.example.com/next/file/javascript.js">';
   }
}

Hope that helps.

I added the child theme and script to the functions.php and my iframe embed code still isn’t showing anything in the raw HTML element nor the widget with HTML.

I also tried add the script via a plugin to add to the footer but also not working.

Also i can only edit the RAW or widget from the framework view not the WYSIWYG cornerstone view --see below

Hi,

You need to use https in your iframe src.

eg.

<iframe src="https://analytics.clickdimensions.com.....

I created a test page for you to check.

HI
thanks for help this I got the iframe work but, I end up changing the forms to a widgets on the 2 pages so we could get the styling and responsiveness and it was ok, But i need to add some forms to blog posts, and its not working with a widget nor an iframe. I tried with [x_raw_content] in text view and I tried doing in cornerstone. Nothing shows up. I added the pages #s to the child theme so the JS will show for the iframe, but still nothing. I prefer to use the widget code.

I did some test posts to show you.
basically how do i can js code to a blog post?

We also launched so i updated the secure note with new creds. and the links to my sample pages

Ok, ignore my post, I figured it out. it was the http S thing again
so i forgot that the program we use provides the code without the S and i have to add in
yeah!

Glad you were able to figure it out :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.