Advertisement
TheMightyAnt

JKing - Home (posts)

May 1st, 2015
432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.39 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3.       <div class="header-image latest-header">
  4.      
  5.          <?php if ( has_post_thumbnail(10) ) { echo get_the_post_thumbnail(10, 'large', array( 'class' => 'latest-header-img') ); } ?>
  6.                  
  7.       </div>
  8.      
  9.       <!--<div class="archive">Coming Soon</div>-->
  10.      
  11.       <div class="media-wall">
  12.          
  13.          <?php // Query Arguments
  14.          $args = array(
  15.             'post_type' => array('post', 'events', 'galleries', 'videos'),
  16.             'posts_per_page' => '11',
  17.          );
  18.  
  19.             // The Query
  20.             $the_query = new WP_Query( $args );
  21.            
  22.             // The Loop
  23.             if ( $the_query->have_posts() ) :
  24.            
  25.                echo '<ul class="group" id="wall-posts">';
  26.            
  27.                while ( $the_query->have_posts() ) :
  28.                
  29.                   $the_query->the_post();
  30.                  
  31.                   get_template_part( 'content' );  
  32.                  
  33.                endwhile;
  34.                
  35.                get_template_part( 'includes/tweet' );
  36.                
  37.                echo '</ul>';
  38.                  
  39.             else:
  40.            
  41.                echo '<h2 class="no-posts">There are no news posts</h2>';
  42.            
  43.             endif;
  44.            
  45.             wp_reset_postdata(); ?>  
  46.      
  47.       </div>    
  48.  
  49. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement