Embedding youtube in article

hi there,
my youtube videos are not being displayed anymore. please have a look here: https://mantradevi.de/page/3/
i used this code over 2 years ago:

<iframe width="480" height="270" src="https://www.youtube.com/embed/Qeb2Ho26ga0" frameborder="0" allowfullscreen></iframe>

and it worked. now it stopped working.

the following error is on the website:
Warning: count(): Parameter must be an array or an object that implements Countable in /www/htdocs/w0151411/mantradevi.de/wp-includes/post-template.php on line 284

i read the forum here and tried this with the latest embedding code from youtube for the same video:

[x_video_embed] <iframe width="560" height="315" src="https://www.youtube.com/embed/Qeb2Ho26ga0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>[/x_video_embed]

does not work at all. just displayes also the shortcode :wink:

could you please help me here? thanks so much! kai

ps: i updated theme and cornerstone a full version and now video works again. that is great of course. but not so great that it stopped working just like this in the older theme. how come?

Hello @iTurtle,

Thanks for writing in! Please keep in mind that when you update WordPress core, you will also need to update the theme and all plugins. Out dated theme and plugins will create issues or even messed up the page layout.

Regards.

hi @runel, thanks for your comment! i want to add that i deliberately stayed on the last wordpress 4 version and the last x-theme v6. because they worked together fine. and of course i never changed the iframe-youtube-snippet… regards, kai

Hey @iTurtle,

Inserting the iframe directly in the WordPress editor should work but it won’t be responsive in the past theme versions down to the current. You will need to use WordPress oEmbed or use our Video Shortcode.

When using the shortcode, you should insert the shortcode in the Text Editor. If you paste it in the Visual Editor, it will output as text.

Hope that helps.

dear @christian, thanks for your help! i will try that out later and come back to you :wink: best wishes, kai

You’re most welcome, let us know how it goes,

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.