How can I embed an iframe on my site? I tried pasting the iframe code in the HTML section and it didn't appear.
-
1Can you provide more details for what you're trying to accomplish? Are you pasting the HTML into a template, or as a field value? As it currently stands, this question doesn't appear to be Craft-specific.– Lindsey DCommented Mar 10, 2017 at 18:41
-
Hi I'm having similar problems - I want to embed a podcast from Transistor.FM <iframe src='share.transistor.fm/e/8a1ae567' width='100%' height='180' frameborder='0' scrolling='no' seamless='true' style='width:100%; height:180px;'></iframe> The player shows up in the entry section but not when I preview it. Any thoughts?– Marc BinkleyCommented Jul 24, 2019 at 15:49
Add a comment
|
1 Answer
Use a text field (not rich text). Then in the output, add "raw" to avoid it stripping any HTML tags.
{{ entry.field | raw }}