Advertisement
alamin_89

WP Query post

Nov 15th, 2015
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. <?php
  2. //The Query
  3. query_posts('post');
  4. //The Loop
  5. if ( have_posts() ) : while ( have_posts() ) :
  6. the_post();
  7.  ?>
  8.                     <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  9.                         <div class="hovereffect text-center">
  10.                             <?php the_post_thumbnail( 'medium', array( 'class' => 'img-responsive' ) ); ?>
  11.                             <div class="overlay">
  12.                                 <h2><?php the_title(); ?></h2>
  13.                                 <p>
  14.                                     <a href="<?php the_permalink(); ?>">Read More</a>
  15.                                 </p>
  16.                             </div>
  17.                         </div>
  18.                     </div>
  19. <?php
  20. endwhile;
  21.  
  22. endif;
  23. //Reset Query
  24. wp_reset_query();
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement