single-custom_type.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /*
  3. This is the custom post type post template.
  4. If you edit the post type name, you've got
  5. to change the name of this template to
  6. reflect that name change.
  7. i.e. if your custom post type is called
  8. register_post_type( 'bookmarks',
  9. then your single template should be
  10. single-bookmarks.php
  11. */
  12. ?>
  13. <?php get_header(); ?>
  14. <div id="content" class="clear">
  15. <div id="main" class="col620 clear" role="main">
  16. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  17. <article id="post-<?php the_ID(); ?>" <?php post_class('clear'); ?>>
  18. <header>
  19. <h1><?php the_title(); ?></h1>
  20. <p class="meta">Posted <time><?php the_time('F jS, Y'); ?></time> by <?php the_author(); ?> <span class="amp">&</span> filed under <?php echo get_the_term_list( get_the_ID(), 'custom_cat', "" ) ?>.</p>
  21. </header> <!-- end article header -->
  22. <section class="post_content clear">
  23. <?php the_content(); ?>
  24. </section> <!-- end article section -->
  25. <footer>
  26. <p class="tags"><?php echo get_the_term_list( get_the_ID(), 'custom_tags', '<span class="tags-title">Custom Tags:</span> ', ', ' ) ?></p>
  27. </footer> <!-- end article footer -->
  28. </article> <!-- end article -->
  29. <?php comments_template(); ?>
  30. <?php endwhile; ?>
  31. <?php else : ?>
  32. <article id="post-not-found">
  33. <header>
  34. <h1>Not Found</h1>
  35. </header>
  36. <section class="post_content">
  37. <p>Sorry, but the requested resource was not found on this site.</p>
  38. </section>
  39. <footer>
  40. </footer>
  41. </article>
  42. <?php endif; ?>
  43. </div> <!-- end #main -->
  44. <?php get_sidebar(); // sidebar 1 ?>
  45. </div> <!-- end #content -->
  46. <?php get_footer(); ?>