Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Thanks for making such a great plug-in.
I am attempting to run an iframe inside a text area of a hero image item. I tried using the wpautop control plug-in to turn off filtering, but this did not work for me.
Any ideas?
Hi Moraitis,
Please install the Code Snippets plugin (or use a child theme) and then please navigate to WP AdminSnippetsAdd New and add the following PHP:
Let me know if this helps.
Thanks Alex!
The code worked great. As a work-around I was putting the iFrame inside of a plain old text widget. But now I can have the iFrame inside a hero image that is in a sequence.
I added a couple more tags to get the effect I was looking for:
/** * Add iFrame to allowed wp_kses_post tags * * @param string $tags Allowed tags, attributes, and/or entities. * @param string $context Context to judge allowed tags by. Allowed values are 'post', * * @return mixed */ function custom_wpkses_post_tags( $tags, $context ) { if ( 'post' === $context ) { $tags['iframe'] = array( 'src' => true, 'height' => true, 'width' => true, 'frameborder' => true, 'allowfullscreen' => true, 'style' => true, 'marginwidth' => true, 'marginheight' => true, 'vspace' => true, 'hspace' => true, 'allowtransparency' => true, 'scrolling' => true, ); } return $tags; } add_filter( 'wp_kses_allowed_html', 'custom_wpkses_post_tags', 10, 2 );Thanks again for your help. The SiteBuilder plug-in is great!