Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. <?php
  2. /**
  3. * Template Name: Movies
  4. * Description: A template for displaying all movies.
  5. *
  6. * @package bootstrap-basic
  7. */
  8.  
  9. get_header();
  10. $main_column_size = bootstrapBasicGetMainColumnSize();
  11. ?>
  12. <div class="page_banner">
  13. <div class="container">
  14.  
  15. <h1 class="entry-title"><?php the_title(); ?></h1>
  16.  
  17. <ol class="breadcrumb">
  18. <?php the_breadcrumb(); ?>
  19. </ol>
  20.  
  21. </div>
  22. </div>
  23.  
  24. <div id="main-container" class="container">
  25.  
  26. <div class="page-box">
  27. <?php
  28. if ( have_posts() ) {
  29. while ( have_posts() ) {
  30. the_post();
  31.  
  32. } // end while
  33. } // end if
  34. ?>
  35.  
  36. <?php
  37. $args = array(
  38. 'post_type' => 'movies',
  39. );
  40. $movies = new WP_Query( $args );
  41. if( $movies->have_posts() ) {
  42. while( $movies->have_posts() ) {
  43. $movies->the_post();
  44. ?>
  45.  
  46. <!--Start Event-->
  47. <div class="panel panel-default">
  48. <div class="panel-heading clearfix">
  49. <h3 class="panel-title pull-left"><?php the_field('movie_name'); ?></h3>
  50.  
  51. <div class="btn-group pull-right">
  52. <?php
  53. if(get_field('movie_youtube'))
  54. {
  55. echo '<a href="' . get_permalink() . '" class="btn btn-md btn-success">Watch Trailer</a>';
  56. }
  57. ?>
  58. <a href="" data-toggle="modal" data-target="#myModal" class="btn btn-md btn-primary">Share</a>
  59. </div>
  60. </div>
  61. <div class="panel-body">
  62. <div class="col-md-9">
  63. <div class="blockquote-box">
  64. <div class="col-md-2">
  65. <img class='img-responsive' src="<?php the_field('thumbnail'); ?>"/>
  66. </div>
  67. <div class="col-md-10">
  68. <div class="description">
  69. <p><?php the_field('movie_description'); ?></p>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div style="text-align:center;border-left:1px solid #DDD;" class="col-md-3">
  75. <h4>Information</h4>
  76.  
  77. <?php
  78. if(get_field('movie_showing'))
  79. {
  80. echo 'Showing:' . the_field('movie_showing');
  81. }
  82. ?>
  83. </div>
  84. </div>
  85. </div>
  86. <!--End Event-->
  87.  
  88. <?php
  89. }
  90. }
  91. else {
  92. echo 'No movies found.';
  93. }
  94. ?>
  95. </div>
  96. </div>
  97.  
  98. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement