Auto embed movies from YouTube/Vimeo. The right way?
-
Since upgrading WordPress to version 3.5 and Events Manager to the latest version, auto embed of YouTube/Vimeo movies doesn’t work anymore.
I previously used
<?php the_content(); ?>
to display the event or location content. This didn’t work anymore.
Now I changed single-event.php and replaced it with
<?php echo $EM_Event->output('#_EVENTNOTES'); ?>
This shows the content, but doesn’t convert a YouTube url to a movie.
What is the right way to get this to work again?
-
maybe this will help – http://wordpress.org/support/topic/embedding-youtube-videos-into-an-event?replies=9
I found that already. But shouldn’t those URLS be translated to embeds automatically? WordPress does it using the_content by default.
probably not happening because we’re overwriting the_content with our formats after WP has converted the links. will look into that asap, because ideally it should work with the [embed] shortcode too
an alternative for the moment is to use a plugin like jetpack which has embed shortcodes too e.g.
[youtube=http://www.youtube.com/watch?v=JaNH56Vpg-A]
tested this and works on the demo site – http://demo.wp-events-plugin.com/events/pierce-the-veil-2012-12-18/
Thanks Marcus. Client has a lot of events/locations with almost every event/location a youtube or vimeo link in the content. Would take a lot of work to change them all. (and a customer who will be angry)
[embed] code the Jetpack method doesn’t work either.
did you try out the youtube example I gave above? That definitely does work, as you can see on the demo.
Hi Marcus,
It works on a normal blogpost with both URL only and [youtube=…] However it doesn’t work from Events or Locations. So there is something wrong.
Any ideas?
have you tried this on a default theme? or maybe with other plugins disabled?
if you have a sample link where you’re trying this on, it may help (although won’t be able to check till after the holidays)
I already found a solution this morning. I have deactivated a popular posts plugin, which wasn’t needed. I reverted back to <?php the_content(); ?> and now all movies or soundcloud tags are shown okay.
Still appears a mystery why it doesn’t work with #_EVENTNOTES.
thanks for the updates.
that would probably be because the ‘the_content’ filter isn’t fired which would be what converts those fields
maybe when I fix the embed shortcode not working it’ll also fix this problem too.
FYI, this has been fixed in the latest dev version and will be in the next update. Embed codes and e.g. youtube urls now get converted correctly.
- The topic ‘Auto embed movies from YouTube/Vimeo. The right way?’ is closed to new replies.