Skip to content

Instantly share code, notes, and snippets.

@kovshenin
Created January 22, 2014 10:33
Show Gist options
  • Save kovshenin/8556595 to your computer and use it in GitHub Desktop.
Save kovshenin/8556595 to your computer and use it in GitHub Desktop.
<?php
/**
* Template Name: Movie Template
* Description: A Page Template for a movies pages.
*/
function get_page_mediablock( $url ) {
global $wp_embed;
return $wp_embed->run_shortcode( '[embed width="1200"]' . esc_url_raw( $url ) . '[/embed]' );
}
?>
<?php get_header(); ?>
<div id="global-content-container">
<div id="primary" class="site-content">
<div class="container-extra-sheet-padding">
<?php while ( have_posts() ) : the_post(); ?>
<?php echo get_page_mediablock( 'http://www.youtube.com/watch?v=0KmgClgFcws' ); ?>
<?php print_r( get_post_meta( get_the_ID() ) ); ?>
<?php endwhile; // end of the loop. ?>
</div>
</div>
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment