Advertisement
rexcoder

power reports

Apr 4th, 2019
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.24 KB | None | 0 0
  1. <?php //if( term_exists( 'Video', 'category' ) ) :
  2. $args = array(
  3.     'post_type'         => 'post',
  4.     'post_status'       => 'publish',
  5.     'numberposts'       => 4,
  6.     'category_name'     => 'Pizza Power Reports',
  7.     'orderby'           => 'date',
  8.     'order'             => 'DESC',
  9.     'exclude'           => array(),
  10. );
  11. $the_query = new WP_Query( $args );
  12. $count = 0;
  13.  
  14. ?>
  15.  
  16. <div class="power-reports">
  17.     <?php
  18.     if (  $the_query->have_posts() ) :
  19.         while ($the_query->have_posts()) {
  20.             $the_query->the_post();
  21.             $count++;
  22.  
  23.         if ($count == 1) :
  24.     ?>
  25.     <div class="col-md-4 pl-0">
  26.         <a href="#"><img src="<?php echo PMQ_IMAGES; ?>/power-reports.png" alt=""></a>
  27.         <?php //the_title(); ?>
  28.     </div>
  29.     <?php endif;
  30.     if ($count > 1 && $count <= 4 ) {
  31.     ?>
  32.  
  33.     <div class="col-md-8 pr-0">
  34.         <?php if($count == 2 ): ?>
  35.         <h2><?php echo esc_html( 'PIZZA POWER REPORTS', 'themeplate' ); ?></h2>
  36.         <?php endif; ?>
  37.         <div class="entry-title">
  38.             <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?> <i class="fa fa-angle-right"></i></a></h3>
  39.         </div>
  40.     </div>
  41.     <?php } } endif; ?>
  42.  
  43. </div>
  44.  
  45.  
  46. <?php //endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement