content-grid.php 852 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Template part for displaying content of grid page templates.
  4. *
  5. * @package Pique
  6. */
  7. ?>
  8. <?php
  9. $pique_child_pages = new WP_Query( array(
  10. 'post_type' => 'page',
  11. 'orderby' => 'menu_order',
  12. 'order' => 'ASC',
  13. 'post_parent' => $post->ID,
  14. 'posts_per_page' => 12,
  15. 'no_found_rows' => true,
  16. ) );
  17. ?>
  18. <?php if ( $pique_child_pages->have_posts() ) : ?>
  19. <div class="pique-grid-three">
  20. <?php while ( $pique_child_pages->have_posts() ) : $pique_child_pages->the_post(); ?>
  21. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  22. <?php
  23. if ( has_post_thumbnail() ) :
  24. the_post_thumbnail( 'pique-square' );
  25. endif;
  26. ?>
  27. <?php the_title( '<h3>' , '</h3>' ); ?>
  28. <?php the_content(); ?>
  29. </article>
  30. <?php endwhile; ?>
  31. </div><!-- .child-pages .grid -->
  32. <?php
  33. endif;
  34. wp_reset_postdata();
  35. ?>