Advertisement
Guest User

single.php

a guest
Jun 19th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  3.  
  4. <div <?php post_class() ?>>
  5. <h2><?php the_title(); ?></h2>
  6. <div class="date">
  7. <div class="bg">
  8. <span><?php the_time('M') ?></span>
  9. <span class="day"><?php the_time('d') ?></span>
  10. <span><?php the_time('Y') ?></span>
  11. </div>
  12. </div>
  13.  
  14. <div class="entry">
  15. <?php the_content(); ?>
  16. <div class="cl">&nbsp;</div>
  17. </div>
  18.  
  19. <div class="meta">
  20. <div class="bg">
  21. <span class="comments-num"><?php comments_popup_link('No Comments', '1 Comment', '% Comments') ?></span>
  22. <p>Posted <!-- by <?php the_author() ?> --> in <?php the_category(', ') ?></p>
  23. </div>
  24. <div class="bot">&nbsp;</div>
  25. <?php
  26. $current_cats = get_the_category();
  27. $current_category = $current_cats[0]->term_id;
  28. $category = get_category($current_category);
  29. $cat_slug = $category->slug;
  30.  
  31. if ($cat_slug == "wolves-in-sheeps-clothing" || $cat_slug == "fruit-that-remains") {
  32. $my_post_type = "chapter";
  33. $my_category_type = "this booklet";
  34. }
  35. else {
  36. $my_post_type = "post";
  37. $my_category_type = "this category";
  38. ?>
  39. <div id="post-navigation">
  40. <div class="nav-previous"><?php previous_post_link('%link', 'Previous ' . $my_post_type . ' in ' . $my_category_type, TRUE); ?></div>
  41. <div class="nav-next"><?php next_post_link('%link', 'Next ' . $my_post_type . ' in ' . $my_category_type, TRUE); ?></div>
  42. </div>
  43.  
  44. </div>
  45. <?php the_tags( '<p class="tags">Tags: ', ', ', '</p>'); ?>
  46. </div>
  47. <?php comments_template(); ?>
  48. <?php endwhile; else: ?>
  49. <p>Sorry, no posts matched your criteria.</p>
  50. <?php endif; ?>
  51. <?php get_sidebar('single'); ?>
  52. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement