SHARE
TWEET

Untitled

a guest Mar 26th, 2020 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * Template Name: Front Page
  4.  */
  5.  
  6. get_header();?>
  7.  
  8. <?php
  9. $condition =array(
  10.     "post_type"         => "post",
  11.     "post_status"       => "publish",
  12.     "posts_per_page"    => 11
  13. );
  14. $the_query = new WP_Query( $condition );
  15. $i = 1;
  16. ?>
  17. <div class="container">
  18.     <div class="grid">
  19.  
  20.         <?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
  21.  
  22.             <div class="grid-item grid-item-<?php echo $i;?>">
  23.                
  24.                 <h3><?php the_title();?></h3>
  25.                 <?php the_content();?>
  26.  
  27.             </div>
  28.  
  29.         <?php $i++; endwhile; wp_reset_postdata(); endif; ?>
  30.  
  31.     </div>
  32. </div>
  33.  
  34. <?php get_footer();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top