Advertisement
Guest User

blog template

a guest
Jul 31st, 2010
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <?php /* Template Name: blog */ ?>
  2.  
  3. <?php get_header(); ?>
  4.  
  5. <div id="content">
  6.  
  7. <?php query_posts( 'post_type=blog');
  8. if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  9.  
  10. <div class="post" id="post-<?php the_ID(); ?>">
  11. <h2 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  12. <div class="postmetadata">
  13. <?php if( function_exists('the_tags') )
  14. the_tags(__('Browse: '), ', ', '<br />');
  15. ?>
  16. <?php edit_post_link(__('Edit'), ''); ?>
  17. </div>
  18. <div class="postentry">
  19. <?php the_content(__('Continue reading'). " &#8216;" . the_title('', '', false) . "&#8217; &raquo;"); ?>
  20. </div>
  21. <div class="postmetadata"><?php the_time('j F Y') ?> <!-- <?php _e('by') ?> <?php the_author() ?> --></div>
  22.  
  23. <?php comments_popup_link(__('Comment'), __('1 Comment'), __('% Comments')); ?>
  24. </div>
  25.  
  26. <?php endwhile; ?>
  27.  
  28. <div class="navigation">
  29. <div class="alignleft"><?php next_posts_link(__('&laquo; Previous Entries')) ?></div>
  30. <div class="alignright"><?php previous_posts_link(__('Next Entries &raquo;')) ?></div>
  31. </div>
  32.  
  33. <?php else : ?>
  34. <div class="post">
  35. <h2 class="posttitle"><?php _e('Not Found') ?></h2>
  36. <div class="postentry"><p><?php _e('Sorry, no posts matched your criteria.'); ?></p></div>
  37. </div>
  38.  
  39. <?php endif; ?>
  40. </div>
  41.  
  42. <?php get_sidebar(); ?>
  43. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement