Passer la navigation

[Résolu] Use of iframe as dynamic content for posts

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 3 years, 7 months. 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.

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par muriloM-2 Il y a 3 years, 6 months.

Assisté par: Christopher Amirian.

Auteur
Publications
#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="lien caché" width="100%" height="615px" style="max-width: 601px;" name="givebutter" frameborder="0" scrolling="no" seamless allowpaymentrequest></iframe><script src="lien caché"></script>
What is the link to your site?
This is the page I am trying to have the iframe: lien caché

#2490607

Christopher Amirian
Supporter

Les langues: Anglais (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!