Advertisement
Guest User

Untitled

a guest
Sep 5th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Page Of Posts
  4. */
  5.  
  6. // if you are not using this in a child of Twenty Eleven, you need to replicate the html structure of your own theme.
  7.  
  8. get_header(); ?>
  9. <div id="primary">
  10. <div id="content" role="main">
  11.  
  12. <?php
  13. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  14. $args= array(
  15. 'category_name' => 'uncategorized', // Change these category SLUGS to suit your use.
  16. 'paged' => $paged
  17. );
  18. query_posts($args);
  19. if( have_posts() ) :?>
  20.  
  21. <?php twentyeleven_content_nav( 'nav-above' );?>
  22.  
  23. <?php while ( have_posts() ) : the_post(); ?>
  24.  
  25. <?php get_template_part( 'content', get_post_format() ); ?>
  26.  
  27. <?php endwhile; ?>
  28.  
  29. <?php twentyeleven_content_nav( 'nav-below' ); ?>
  30.  
  31. <?php else : ?>
  32. <article id="post-0" class="post no-results not-found">
  33. <header class="entry-header">
  34. <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
  35. </header><!-- .entry-header -->
  36.  
  37. <div class="entry-content">
  38. <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
  39. <?php get_search_form(); ?>
  40. </div>
  41. </article>
  42.  
  43. <?php endif; ?>
  44.  
  45. </div>
  46. </div>
  47.  
  48. <?php get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement