Guest User

Blog

a guest
Oct 26th, 2011
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Blog
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8. <?php include('sidebar.php');?>
  9. <div id="container">
  10. <?php
  11. $posts_wanted = get_option('posts_per_page');
  12. query_posts("showposts=$posts_wanted");
  13. $post_class = 'odd';
  14. ?>
  15.  
  16. <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
  17.  
  18. <div class="post <?php echo $post_class; ?>">
  19.  
  20. <h2>
  21. <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
  22. </h2>
  23.  
  24. <div class="byline">
  25. <?php _e('Posted By '); ?> <?php the_author_posts_link(); ?> on <?php the_time(__('F j, Y')); ?>
  26. </div>
  27.  
  28. <div class="entry">
  29. <?php the_content(__('Read more &raquo;','options')); ?>
  30. </div>
  31.  
  32. <div class="postmetadata">
  33. <?php _e('Category&#58;'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php the_author(); ?> <?php edit_post_link('Edit', ' &#124; ', ''); ?> <br />
  34. <span class="tags"><?php _e('Tags: '); ?> <?php the_tags('', ', ', ''); ?></span>
  35. </div>
  36. </div>
  37.  
  38. <?php
  39. if('odd' == $post_class) $post_class = 'even';
  40. else $post_class == 'odd';
  41. ?>
  42.  
  43. <?php endwhile; ?>
  44.  
  45. <?php else: ?>
  46.  
  47. <p><?php _e('Sorry, no posts matched your criteria.','options'); ?></p>
  48.  
  49. <?php endif; ?>
  50. </div>
  51. <?php include('bio.php');?>
  52. <?php include('misc.php');?>
  53. <?php get_footer(); ?>
  54.  
Advertisement
Add Comment
Please, Sign In to add comment