page-custom.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /*
  3. Template Name: Custom Page Example
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7. <div id="content">
  8. <div id="inner-content" class="wrap clearfix">
  9. <div id="main" class="eightcol first clearfix" role="main">
  10. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  11. <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
  12. <header class="article-header">
  13. <h1 class="page-title"><?php the_title(); ?></h1>
  14. <p class="meta"><?php _e("Posted", "bonestheme"); ?> <time datetime="<?php echo the_time('Y-m-j'); ?>" pubdate><?php the_time('F jS, Y'); ?></time> <?php _e("by", "bonestheme"); ?> <?php the_author_posts_link(); ?>.</p>
  15. </header> <!-- end article header -->
  16. <section class="post-content">
  17. <?php the_content(); ?>
  18. </section> <!-- end article section -->
  19. <footer class="article-footer">
  20. <p class="clearfix"><?php the_tags('<span class="tags">Tags: ', ', ', '</span>'); ?></p>
  21. </footer> <!-- end article footer -->
  22. <?php comments_template(); ?>
  23. </article> <!-- end article -->
  24. <?php endwhile; ?>
  25. <?php else : ?>
  26. <article id="post-not-found" class="hentry clearfix">
  27. <header class="article-header">
  28. <h1><?php _e("Oops, Post Not Found!", "bonestheme"); ?></h1>
  29. </header>
  30. <section class="post-content">
  31. <p><?php _e("Uh Oh. Something is missing. Try double checking things.", "bonestheme"); ?></p>
  32. </section>
  33. <footer class="article-footer">
  34. <p><?php _e("This is the error message in the page-custom.php template.", "bonestheme"); ?></p>
  35. </footer>
  36. </article>
  37. <?php endif; ?>
  38. </div> <!-- end #main -->
  39. <?php get_sidebar(); // sidebar 1 ?>
  40. </div> <!-- end #inner-content -->
  41. </div> <!-- end #content -->
  42. <?php get_footer(); ?>