Advertisement
Guest User

Custom page

a guest
Jan 13th, 2012
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: PageOfPosts
  4. */
  5.  
  6. get_header(); ?>
  7.  
  8. <?php get_sidebar(); ?>
  9.  
  10.  
  11. <div id="main-inner">
  12.  
  13.  
  14.  
  15. <?php
  16. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  17. $args= array(
  18. 'category_name' => 'Features', // Change these category SLUGS to suit your use
  19. 'paged' => $paged
  20. );
  21. query_posts($args);
  22. query_posts( 'posts_per_page=10' );
  23.  
  24.  
  25. if( have_posts() ) :?>
  26.  
  27.  
  28. <?php while ( have_posts() ) : the_post(); ?>
  29.  
  30. <li class="article">
  31. <h1><?php the_title(); ?></h1>
  32. <div class="postmetadata">
  33. Posted: <?php the_time(__('F jS, Y')) ?>&nbsp;&#721;&nbsp;<?php printf(__('Filled under: %s'), get_the_category_list(', ')); ?>&nbsp;&#721;&nbsp;
  34. <?php edit_post_link(__('Edit this entry'), '&nbsp;&#721;&nbsp;', ''); ?>
  35. </div>
  36. <?php the_content(); ?>
  37.  
  38.  
  39.  
  40.  
  41.  
  42. <?php endwhile; ?>
  43.  
  44. <?php the_content(); ?>
  45.  
  46. <?php else : ?>
  47. <article id="post-0" class="post no-results not-found">
  48. <header class="entry-header">
  49. <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
  50. </header><!-- entry-header -->
  51.  
  52. <div class="entry-content">
  53. <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
  54. <?php get_search_form(); ?>
  55. </div>
  56. </article>
  57.  
  58. <?php endif; ?>
  59.  
  60. </div>
  61. </div>
  62.  
  63.  
  64.  
  65. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement