Created
April 13, 2015 12:56
-
-
Save michaelschofield/13b0883d7fcc8d697ef6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> role="article" itemscope itemtype="http://schema.org/Event"> | |
<?php | |
// Post thumbnail. | |
twentyfifteen_post_thumbnail(); | |
?> | |
<header class="entry-header"> | |
<?php | |
// Apply itemprop="name" to the title of the event | |
if ( is_single() ) : | |
the_title( '<h1 class="entry-title" itemprop="name">', '</h1>' ); | |
else : | |
the_title( sprintf( '<h2 class="entry-title" itemprop="name"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); | |
endif; | |
?> | |
</header><!-- .entry-header --> | |
<div class="entry-content"> | |
<?php | |
// We can markup start and end dates using 'itemprop="startDate"' (for example) | |
// without, unless you prefer, using an otherwise meaningful element. | |
// We could use <time>, or we can use semantically meaningless | |
// <span> as below. | |
echo '<span itemprop="startDate">' . date( 'l, F jS', strtotime( $start ) ) . '</span> from <span itemprop="doorTime">' . date( 'g:i a', strtotime( $start ) ) . '</span> - ' . date( 'g:i a', strtotime( $end ) ) . '<br>'; | |
the_content(); | |
wp_link_pages( array( | |
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>', | |
'after' => '</div>', | |
'link_before' => '<span>', | |
'link_after' => '</span>', | |
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%', | |
'separator' => '<span class="screen-reader-text">, </span>', | |
) ); | |
?> | |
</div><!-- .entry-content --> | |
<?php | |
// Author bio. | |
if ( is_single() && get_the_author_meta( 'description' ) ) : | |
get_template_part( 'author-bio' ); | |
endif; | |
?> | |
<footer class="entry-footer"> | |
</footer><!-- .entry-footer --> | |
</article><!-- #post-## --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment