Add single event shortcode
This commit is contained in:
9
templates/event-video.php
Normal file
9
templates/event-video.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
if ( ! isset( $id ) )
|
||||
$id = get_the_ID();
|
||||
|
||||
$video_url = get_post_meta( $id, 'sp_video', true );
|
||||
if ( $video_url ):
|
||||
global $wp_embed;
|
||||
echo $wp_embed->autoembed( $video_url );
|
||||
endif;
|
||||
Reference in New Issue
Block a user