Facebook
From Edgy Hornbill, 4 Years ago, written in PHP.
Embed
Download Paste or View Raw
Hits: 153
  1. <div class="row page-gallery">
  2.                         <div class="col-md-12 page-gallery--container animatedParent">
  3.                             <?php $query = new WP_Query(array(
  4.                                 'post_type' => 'Food',
  5.                                 'post_status' => 'publish',
  6.                                 'order' => 'DESC',
  7.                                 'posts_per_page' => -1
  8.                             ));
  9.                             $animationDelay = 1;
  10.                             ?>
  11.                             <?php while ($query->have_posts()) {
  12.                                 $query->the_post();
  13.                                 $post_id = get_the_ID(); ?>
  14.                                 <div class="col-md-4 col-sm-12 col-xs-12 page-gallery--container--content">
  15.                                     <div class="gallery-box">
  16.                                         <a href="<?php echo get_permalink(); ?>">
  17.                                             <img src="<?php the_post_thumbnail_url( 'full' );   ?>" alt="<?php echo get_the_title(); ?>">
  18.                                         </a>
  19.                                         <a class="gallery-link" href="<?php echo get_permalink(); ?>">
  20.                                             <h2><?php echo get_the_title(); ?></h2>
  21.                                         </a>
  22.                                     </div>
  23.                                 </div>
  24.                             <?php } ?>
  25.                             <?php wp_reset_query(); ?>
  26.                         </div>