Skip to content

Instantly share code, notes, and snippets.

@carolinan
Last active February 11, 2016 06:45
Show Gist options
  • Save carolinan/bb4b1ce7e7915c9ea8d1 to your computer and use it in GitHub Desktop.
Save carolinan/bb4b1ce7e7915c9ea8d1 to your computer and use it in GitHub Desktop.
<?php
/**
* The template used for displaying page content in page.php
*
* @package aaron
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( ! aaron_get_meta( 'aaron_replace_title' ) ){
if ( is_page_template( 'templates/sections.php' ) ) {
echo '<header class="entry-header">';
the_title( '<h2 class="entry-title">', '</h2>' );
echo '</header><!-- .entry-header -->';
}else{
echo '<header class="entry-header">';
the_title( '<h1 class="entry-title">', '</h1>' );
echo '</header><!-- .entry-header -->';
}
}
?>
<div class="entry-content">
<?php
if( !aaron_get_meta( 'aaron_show_header' ) || !aaron_get_meta( 'aaron_featured_image_header' ) ){
$name = get_post_meta($post->ID, 'ExternalUrl', true);
if( $name ) { ?>
<a href="<?php echo esc_url($name); ?>"><?php the_post_thumbnail(); ?></a>
<?php } else {
the_post_thumbnail();
}
}
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'aaron' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<?php
/* Display jetpack's share if it's active*/
if ( function_exists( 'sharing_display' ) ) {
echo sharing_display();
}
?>
</article><!-- #post-## -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment