Add single event shortcode

This commit is contained in:
Brian Miyaji
2014-04-02 10:18:22 +11:00
parent cf519c4e25
commit c37ab3cdb8
10 changed files with 221 additions and 33 deletions

View 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;

9
templates/event.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
if ( ! isset( $id ) )
$id = get_the_ID();
sp_get_template( 'event-video.php', array( 'id' => $id ) );
sp_get_template( 'event-results.php', array( 'id' => $id ) );
sp_get_template( 'event-details.php', array( 'id' => $id ) );
sp_get_template( 'event-venue.php', array( 'id' => $id ) );
sp_get_template( 'event-performance.php', array( 'id' => $id ) );