Events Manager
[resolved] [closed] Embedding YouTube videos into an event? (9 posts)

  1. Creight
    Posted 3 years ago #

    Hi - is it possible to embed a You Tube video into an event. We have tried the usual WordPress [embed] youtubevideoURL [/embed] but it appears to get stripped out by EM.



  2. agelonwl
    Posted 3 years ago #


    you can try something like

    <iframe width="560" height="315" src="http://www.youtube.com/embed/video_id" frameborder="0" allowfullscreen></iframe>

    in event details then use #_EVENTNOTES at settings > formatting > events > default single event format

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    The WP ways should work, we don't strip out any shortcodes. Where are you adding it?

  4. ibcreative
    Posted 3 years ago #

    Yeah, it´s not working for me either. So the next thing i´m trying is to set a new attribute #_ATT{#youTube} and hopefully check if its not empty, if not empty, show a div and load the video in it.

    The thing is, i haven´t figured out how to do that check yes? Any thoughts on that?

    Thank You.

  5. agelonwl
    Posted 3 years ago #

    try #_ATT{youTube} instead of #_ATT{#youTube}

  6. ibcreative
    Posted 3 years ago #

    Thank you agelonwl, you were right about that.

    So i got the solution i was looking for, maybe someone needs something like this so here´s the code (be sure to set the custom att #_ATT{#youTube} first ):

    $youtubeurl = $event->output('#_ATT{youTube}');
    if (youtubeurl!= "0")
    global $wp_embed;
    $post_embed = $wp_embed->run_shortcode('[embed width="320" height="240"]'.$youtubeurl.'[/embed]');
    echo $post_embed;

    This script checks if there´s anything stored on the custom att, namely a youtube url in this case, and if so then proceeds to embed the video.

  7. dwaber
    Posted 3 years ago #

    And where you have this script to put? functions.php in the local theme?

  8. agelonwl
    Posted 3 years ago #

    you can try to use template file at wp-content/plugins/events-manager/templates/templates/event-single.php

    to use templates: http://wp-events-plugin.com/documentation/using-template-files/

  9. dwaber
    Posted 3 years ago #

    Thanks for your very fast help. It worked now (also for vimeo).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic