Skip to main content
deleted 36 characters in body
Source Link
dmoz
  • 166
  • 4
  • 14
<?php
/*
Template Name: Homepage Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films',
                         'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'homepage',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;get_the_ID();
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php
/*
Template Name: Documentary Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films',
                         'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'documentary',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;get_the_ID();
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php
/*
Template Name: Homepage Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films',
                         'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'homepage',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php
/*
Template Name: Documentary Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films',
                         'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'documentary',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php
/*
Template Name: Homepage Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films',
                         'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'homepage',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    $post_id = get_the_ID();
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php
/*
Template Name: Documentary Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films',
                         'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'documentary',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    $post_id = get_the_ID();
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
more code
Source Link
dmoz
  • 166
  • 4
  • 14
<?php
/*
Template Name: Homepage Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films', 
 'category_name'                        'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'homepage',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php
/*
Template Name: Documentary Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films', 
 'category_name'                        'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'documentary',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php $args = array( 'post_type' => 'films', 'category_name' => 'homepage', 'posts_per_page' => '-1', );
      $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php $args = array( 'post_type' => 'films', 'category_name' => 'documentary', 'posts_per_page' => '-1', );
      $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php
/*
Template Name: Homepage Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films', 
                         'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'homepage',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php
/*
Template Name: Documentary Reels
*/

/*
@package _tk
*/

get_header(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-content">
    
    <div class="container-fluid">
    
    <?php $args = array( 'post_type' => 'films', 
                         'tax_query' => array(
                                            array(
                                            'taxonomy' => 'film-type',
                                            'field' => 'slug',
                                            'terms' => 'documentary',
                                            )
                                        ),
                         'posts_per_page' => '-1', );
          $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
updated with more code
Source Link
dmoz
  • 166
  • 4
  • 14
<?php $args = array( 'post_type' => 'films', 'category_name' => 'homepage', 'posts_per_page' => '-1', );
      $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> 

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php $args = array( 'post_type' => 'films', 'category_name' => 'documentary', 'posts_per_page' => '-1', );
      $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php $args = array( 'post_type' => 'films', 'category_name' => 'homepage', 'posts_per_page' => '-1', );
      $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php $args = array( 'post_type' => 'films', 'category_name' => 'documentary', 'posts_per_page' => '-1', );
      $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php $args = array( 'post_type' => 'films', 'category_name' => 'homepage', 'posts_per_page' => '-1', );
      $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> 

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
<?php $args = array( 'post_type' => 'films', 'category_name' => 'documentary', 'posts_per_page' => '-1', );
      $the_query = new WP_Query( $args ); ?>
          
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<?php /* Get the current post ID. */
                    global $post;
                    $post_id = $post->ID;
                  /* If we have a post ID, proceed. */
                    if ( !empty( $post_id ) ) { ?>
                    
                    <div class="film_wrap col-md-4">
                
                        <?php // <h2 class="film_title"><?php the_title(); ?><?php //</h2> ?>

                        <?php $videourl = get_post_meta( $post_id, 'film_embed', true );
                              if ( $videourl != '' ) {
                                echo wp_oembed_get( $videourl ); 
                              } ?>
                        
                        <?php if ( get_post_meta( $post_id, 'film_textarea', true ) ) : ?>
                            <div class="film_description">
                                <p><?php echo get_post_meta( $post_id, 'film_textarea', true ); ?></p>
                            </div>
                        <?php endif; ?>
                    
                    </div>
                        
                    <?php } else { ?>
                    
                        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
                    
                    <?php } ?>
                    
        <?php wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', '_tk' ),
            'after'  => '</div>',
        ) ); ?>
        
    <?php endwhile; ?>
    <?php endif; ?>
Source Link
dmoz
  • 166
  • 4
  • 14
Loading