-
-
Save farinspace/1491041 to your computer and use it in GitHub Desktop.
Can't get videos working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php global $video_metabox; $video_metabox->the_meta(); ?> | |
<?php if ( $video_metabox->have_value( 'vids' ) ) { ?> | |
<ul class="project_videos"> | |
<?php while( $video_metabox->have_fields('vids') ) { ?> | |
<?php echo wp_oembed_get( $video_metabox->the_value( 'videourl' ) ); ?> | |
<?php } ?> | |
</ul> | |
<?php } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php global $wp_embed, $video_metabox; $video_metabox->the_meta(); ?> | |
<?php if ( $video_metabox->have_value( 'vids' ) ) { ?> | |
<ul class="project_videos"> | |
<?php while( $video_metabox->have_fields('vids') ) { ?> | |
<?php do_shortcode( $wp_embed->run_shortcode( '[embed]' . $video_metabox->the_value( 'videourl' ) . '[/embed]' ) ); ?> | |
<?php } ?> | |
</ul> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
wp_oembed_get
solution seems like it is best suited for this case, thanks for the tip!