Skip to content

Instantly share code, notes, and snippets.

@nakamuraagatha
Created December 17, 2015 09:49
Show Gist options
  • Save nakamuraagatha/656333c1a805e4b00ef2 to your computer and use it in GitHub Desktop.
Save nakamuraagatha/656333c1a805e4b00ef2 to your computer and use it in GitHub Desktop.
<?php
/*
* Template Name: Movie Page
*/
get_header(); ?>
<!-- Main Content -->
<div class="large-12 columns" role="content">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="panel">
<?php get_template_part( 'content', 'page' ); ?>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php $mymovies = new WP_Query(array(
'post_type' => 'my_movies'
)); ?>
<?php while($mymovies->have_posts()) : $mymovies->the_post(); ?>
<div class="large-6 columns">
<div class="panel">
<div class="thumbtitle group">
<div class="thumbnail">
<?php the_post_thumbnail('thumbnail'); ?>
</div>
<h5><?php the_title(); ?>
<span class="date">
<?php $date = DateTime::createFromFormat('Ymd', get_field('year'));
echo $date->format('Y'); ?>
</span>
</h5>
<p> My Rating : <span class="rating"> <?php the_field('my_rating'); ?></span> </p>
</div>
<div class="content">
<p><?php the_field('description'); ?></p>
<div class="panel white">
<h6> My Toughts :</h6>
<p><?php the_field('my_thoughts'); ?></p>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<!-- End Main Content -->
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment