Ben Zen
asked 9 years ago

1st of all I <3 the Minion theme, great work 😉

I need your assistance.
For some reason youtube videos won’t show anymore IF they a placed inside any accordion (plugin).
No matter if I use "Shortcodes Ultimate" accordion OR "WP Canvas – Shortcodes" accordion.

For example a simple:

works inside a page or post.


  [su_spoiler title="Intro"]

The accordion is displayed empty when clicked.
Text and Images are working inside accordions & youtube videos are working inside of tabs shortcodes.

This only happens inside accordions in combination with the Minion Theme (and not for example with WordPress default themes).

Any idea why this is happening?

And are there shortcodes to use the minion accordion as in the widgets?

THANK YOU in advance!


1 Answers
answered 9 years ago

YouTube videos can be easily embedded into the Text widget by using iframe. However, this is not the case for the Embed. If you want to insert video into text widget using oEmbed, add the following code in your theme’s functions.php file.

add_filter( 'widget_text', array( $wp_embed, 'run_shortcode' ), 8 );
add_filter( 'widget_text', array( $wp_embed, 'autoembed' ), 8 );

Save the file and now you can enjoy another convenient way to embed your video to Text widget.
See the screenshot:

Hope this helps !

Powered by DW Question & Answer Pro