Advertisement
maio

pageofpost

Jun 10th, 2013
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.26 KB | None | 0 0
  1.  
  2. get_header(); ?>
  3.  
  4.        
  5.        
  6.           <?php
  7.             /* The loop: the_post retrieves the content
  8.              * of the new Page you created to list the posts,
  9.              * e.g., an intro describing the posts shown listed on this Page..
  10.              */
  11.             if ( have_posts() ) :
  12.                 while ( have_posts() ) : the_post();
  13.  
  14.                   // Display content of page
  15.                   get_template_part( 'content', 'page' );
  16.                   wp_reset_postdata();
  17.                  
  18.                  
  19.                  
  20.      
  21.                 endwhile;
  22.             endif;
  23.            
  24.                
  25.                 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  26.  
  27.                 $args = array(
  28.                     // Change these category SLUGS to suit your use.
  29.                     'category_name' => 'portfolio',
  30.                     'paged' => $paged
  31.                 );
  32.  
  33.                 $list_of_posts = new WP_Query( $args );
  34.                 ?>
  35.                
  36.                 <?php if ( $list_of_posts->have_posts() ) : ?>
  37.                     <?php /* The loop */ ?>
  38.                     <?php while ( $list_of_posts->have_posts() ) : $list_of_posts->the_post(); ?>
  39.                         <?php // Display content of posts ?>
  40.                         <?php get_template_part( 'content', get_post_format() ); ?>
  41.                     <?php endwhile; ?>
  42.  
  43.                     <?php catchbox_content_nav( 'nav-below' ); ?>
  44.  
  45.                 <?php else : ?>
  46.                     <?php get_template_part( 'content', 'none' ); ?>
  47.                 <?php endif; ?>
  48.            
  49.         </div><!-- #content -->
  50.        
  51.     </div><!-- #primary -->
  52.        
  53.  
  54. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement