[Resolved] iframe/embed code integration with elementor
This support ticket is created 4 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Tell us what you are trying to do?
Add dynamic embed code/iframes. I added the embed code in a the text editor of the WYSIWYG custom field type and can see that it works when I click over to the visual editor. I then use the elementor text widget to call the code in dynamically but it doesn't render. Instead it removes a piece of the code and then shows the text of the remaining portion of the code itself instead of the widget. Do you have any resources on how to accomplish this?
Is there any documentation that you are following?
Cannot find documentation specific to what I am trying to do. I did find these two links, but I am not sure they apply to what I am trying to do:
https://toolset.com/forums/topic/how-to-add-dynamic-url-to-src-within-iframe/
ttoo
Is there a similar example that we can see?
The screenshot attached shows the widget/iframe when placed directly into the post template using Elementor's HTML widget, but the HTML widget is not dynamic and doesn't pull from toolset. Right above it is what it looks like when I try to pull the iframe code using the Elementor text widget pulling dynamically from TS field.
Thank you for the clarity. Based on the code Waqar had provided you will need to output the "raw" url. So you will need to use your Types field like this.
[types field='my-field' output='raw'][/types]
As you can see i've added the output='raw' attribute. This should now work for you.
This doesn't help. Maybe I should start at the beginning. I want three separate sections on my template page that will dynamically call in the code for an iframe/embedded code section. When I use Elementors regular code widget, the iframes work, but I want to be able to call the code in dynamically. I tried using a text widget with a WYSIWYG custom field, but that didn't work, so I tried the solution linked above but that isn't working either.
However I see that you are using the dynamic field option from Elementor.
Some elements may not work when using the dynamic field option because elementor will actually strip out some of the HTML from the output in the dynamic field option.
What you need to do is call the field directly with our Types shortcode in order for it to work correctly.
For e.g I was able to get your map iframe to display with .
[types field='great-schools'][/types]