page-custom.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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" itemscope itemtype="http://schema.org/BlogPosting">
  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>
  18. <section class="entry-content clearfix" itemprop="articleBody">
  19. <?php the_content(); ?>
  20. </section>
  21. <footer class="article-footer">
  22. <p class="clearfix"><?php the_tags( '<span class="tags">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '' ); ?></p>
  23. </footer>
  24. <?php comments_template(); ?>
  25. </article>
  26. <?php endwhile; else : ?>
  27. <article id="post-not-found" class="hentry clearfix">
  28. <header class="article-header">
  29. <h1><?php _e( 'Oops, Post Not Found!', 'bonestheme' ); ?></h1>
  30. </header>
  31. <section class="entry-content">
  32. <p><?php _e( 'Uh Oh. Something is missing. Try double checking things.', 'bonestheme' ); ?></p>
  33. </section>
  34. <footer class="article-footer">
  35. <p><?php _e( 'This is the error message in the page-custom.php template.', 'bonestheme' ); ?></p>
  36. </footer>
  37. </article>
  38. <?php endif; ?>
  39. </div>
  40. <?php get_sidebar(); ?>
  41. </div>
  42. </div>
  43. <?php get_footer(); ?>