Ben Zen
asked 7 years ago

Hi!
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: https://www.youtube.com/watch?v=JywImgRWkIo

works inside a page or post.

BUT:

[su_accordion]
  [su_spoiler title="Intro"]
    
  [/su_spoiler]
[/su_accordion]

WON’T WORK.
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!

Ben

1 Answers
DominicStaff
answered 7 years ago

Hi,
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: http://prntscr.com/75fhfl

Hope this helps !

Powered by DW Question & Answer Pro