Viewing 8 replies - 1 through 8 (of 8 total)
  • agelonwl

    (@angelonwl)

    hi,

    you can try something like

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

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

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

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

    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.

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

    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 ):

    <?php
    $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.

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

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

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

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Embedding YouTube videos into an event?’ is closed to new replies.