page-custom.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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="byline vcard"><?php
  15. printf(__('Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span>.', 'bonestheme'), get_the_time('Y-m-j'), get_the_time(__('F jS, Y', 'bonestheme')), bones_get_the_author_posts_link());
  16. ?></p>
  17. </header> <!-- end article header -->
  18. <section class="entry-content">
  19. <?php the_content(); ?>
  20. </section> <!-- end article section -->
  21. <footer class="article-footer">
  22. <p class="clearfix"><?php the_tags('<span class="tags">' . __('Tags:', 'bonestheme') . '</span> ', ', ', ''); ?></p>
  23. </footer> <!-- end article footer -->
  24. <?php comments_template(); ?>
  25. </article> <!-- end article -->
  26. <?php endwhile; ?>
  27. <?php else : ?>
  28. <article id="post-not-found" class="hentry clearfix">
  29. <header class="article-header">
  30. <h1><?php _e("Oops, Post Not Found!", "bonestheme"); ?></h1>
  31. </header>
  32. <section class="entry-content">
  33. <p><?php _e("Uh Oh. Something is missing. Try double checking things.", "bonestheme"); ?></p>
  34. </section>
  35. <footer class="article-footer">
  36. <p><?php _e("This is the error message in the page-custom.php template.", "bonestheme"); ?></p>
  37. </footer>
  38. </article>
  39. <?php endif; ?>
  40. </div> <!-- end #main -->
  41. <?php get_sidebar(); ?>
  42. </div> <!-- end #inner-content -->
  43. </div> <!-- end #content -->
  44. <?php get_footer(); ?>