Skip Navigation

[Resolved] Use of iframe as dynamic content for posts

This thread is resolved. Here is a description of the problem and solution.

Problem:

How to show the iFrame code saved in the custom field. It does not render correctly in the front end.

Solution:

To store the iFrame code use the Single Line custom field type.

To show the iFrame use the Single Field block and make sure you follow the steps below to allow Wordpress show the iFrame:

Relevant Documentation:

https://toolset.com/forums/topic/embedding-youtube-video-using-custom-field/#post-440227

This support ticket is created 2 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by muriloM-2 2 years, 2 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2489747

Tell us what you are trying to do?
I am trying to add an iframe for each post, as these will be one iframe (from a donation software) per post. However, the most logical field types (Embedded media and WYSIWYG) do not allow iframes. The first gives an error "Please enter a valid URL address," while the editor shows the code.
Is there any documentation that you are following?
No.
Is there a similar example that we can see?
Try using this iframe in a post.

<iframe src="hidden link" width="100%" height="615px" style="max-width: 601px;" name="givebutter" frameborder="0" scrolling="no" seamless allowpaymentrequest></iframe><script src="hidden link"></script>
What is the link to your site?
This is the page I am trying to have the iframe: hidden link

#2490607

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Please use the single-line custom field type. Now WordPress does not allow to add iFrame in the content using users lower than admin.

Please follow the steps mentioned in the reply below to override that:

https://toolset.com/forums/topic/embedding-youtube-video-using-custom-field/#post-440227

Thanks.

#2494675

My issue is resolved now. Thank you!