Guest User

Untitled

a guest
May 27th, 2019
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. <?php
  2. /**
  3. * Template Name: Blog 3 column
  4. *
  5. */
  6.  
  7. get_header();
  8. $my_meta = get_post_meta( get_the_ID() ,'_my_meta', TRUE );
  9. if( isset($my_meta['banner_enable'])==true ) {
  10. spasalon_page_banner_strip();
  11. }
  12. else
  13. {
  14. spasalon_pink_banner_strip(); // banner strip
  15. }
  16. ?>
  17.  
  18. <!-- Blog & Sidebar Section -->
  19. <section id="section">
  20. <div class="container">
  21. <div class="row">
  22.  
  23. <!--Blog Detail-->
  24.  
  25.  
  26. <?php
  27. $j=1;
  28. $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
  29. $args = array( 'post_type' => 'post','paged'=>$paged );
  30. $loop = new WP_Query( $args );
  31. ?>
  32.  
  33. <?php if( $loop->have_posts() ): ?>
  34.  
  35. <?php while( $loop->have_posts() ): $loop->the_post(); ?>
  36.  
  37. <div class="col-md-4 col-xs-12">
  38. <div class="site-content">
  39.  
  40. <?php get_template_part('content',''); ?>
  41.  
  42. </div>
  43. </div>
  44.  
  45. <?php if($j%3==0){ echo "<div class='clearfix'></div>"; } $j++; endwhile; ?>
  46.  
  47. <div class="paginations">
  48. <?php
  49. $GLOBALS['wp_query']->max_num_pages = $loop->max_num_pages;
  50. // Previous/next page navigation.
  51. the_posts_pagination( array(
  52. 'prev_text' => __('Previous','spasalon'),
  53. 'next_text' => __('Next','spasalon')
  54. ) ); ?>
  55. </div>
  56.  
  57. <?php else: ?>
  58.  
  59. <?php get_template_part('content','none'); ?>
  60.  
  61. <?php endif; ?>
  62.  
  63.  
  64. <!--/End of Blog Detail-->
  65.  
  66. </div>
  67. </div>
  68. </section>
  69. <!-- End of Blog & Sidebar Section -->
  70.  
  71. <div class="clearfix"></div>
  72.  
  73. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment