page-custom.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /*
  3. Template Name: Custom Page Example
  4. *
  5. * This is your custom page template. You can create as many of these as you need.
  6. * Simply name is "page-whatever.php" and in add the "Template Name" title at the
  7. * top, the same way it is here.
  8. *
  9. * When you create your page, you can just select the template and viola, you have
  10. * a custom page template to call your very own. Your mother would be so proud.
  11. *
  12. * For more info: http://codex.wordpress.org/Page_Templates
  13. */
  14. ?>
  15. <?php get_header(); ?>
  16. <div id="content">
  17. <div id="inner-content" class="wrap cf">
  18. <div id="main" class="m-all t-2of3 d-5of7 cf" role="main">
  19. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  20. <article id="post-<?php the_ID(); ?>" <?php post_class( 'cf' ); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting">
  21. <header class="article-header">
  22. <h1 class="page-title"><?php the_title(); ?></h1>
  23. <p class="byline vcard">
  24. <?php 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(get_option('date_format')), get_the_author_link( get_the_author_meta( 'ID' ) )); ?>
  25. </p>
  26. </header> <?php // end article header ?>
  27. <section class="entry-content cf" itemprop="articleBody">
  28. <?php the_content(); ?>
  29. </section> <?php // end article section ?>
  30. <footer class="article-footer">
  31. <?php the_tags( '<p class="tags"><span class="tags-title">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '</p>' ); ?>
  32. </footer> <?php // end article footer ?>
  33. <?php comments_template(); ?>
  34. </article> <?php // end article ?>
  35. <?php endwhile; else : ?>
  36. <article id="post-not-found" class="hentry cf">
  37. <header class="article-header">
  38. <h1><?php _e( 'Oops, Post Not Found!', 'bonestheme' ); ?></h1>
  39. </header>
  40. <section class="entry-content">
  41. <p><?php _e( 'Uh Oh. Something is missing. Try double checking things.', 'bonestheme' ); ?></p>
  42. </section>
  43. <footer class="article-footer">
  44. <p><?php _e( 'This is the error message in the page-custom.php template.', 'bonestheme' ); ?></p>
  45. </footer>
  46. </article>
  47. <?php endif; ?>
  48. </div> <?php // end #main ?>
  49. <?php get_sidebar(); ?>
  50. </div> <?php // end #inner-content ?>
  51. </div> <?php // end #content ?>
  52. <?php get_footer(); ?>