Advertisement
Guest User

Untitled

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