Advertisement
fahimmurshed

page-blog-full.php

Oct 24th, 2018
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.30 KB | None | 0 0
  1. <?php
  2. /*
  3.  * Template Name: Blog Listing Full
  4.  */
  5. get_header(); ?>
  6.  
  7.     <section id="main">
  8.  
  9.         <div id="content" class="site-content col-md-8" role="main">
  10.             <?php get_template_part('lib/sub-header')?>
  11.  
  12.             <?php
  13.             $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  14.             $args = array('post_type' => 'post','paged' => $paged);
  15.             $thequery = new WP_Query($args);
  16.  
  17.             if ( $thequery->have_posts() ) :
  18.                 while ( $thequery->have_posts() ) : $thequery->the_post();
  19.                     get_template_part( 'post-format/content', get_post_format() );
  20.                 endwhile;
  21.             else:
  22.                 get_template_part( 'post-format/content', 'none' );
  23.             endif;
  24.             wp_reset_postdata();
  25.             ?>
  26.             <?php
  27.             $page_numb = max( 1, get_query_var('paged') );
  28.             $max_page = $thequery->max_num_pages;
  29.             echo themeum_pagination( $page_numb, $max_page );
  30.             ?>
  31.         </div> <!-- #content -->
  32.  
  33.         <div id="sidebar" class="col-md-4" role="complementary">
  34.             <aside class="widget-area">
  35.                 <?php dynamic_sidebar('sidebar');?>
  36.             </aside>
  37.         </div> <!-- #sidebar -->
  38.  
  39.     </section>
  40.  
  41. <?php get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement