This repository has been archived on 2022-08-01. You can view files and clone it, but cannot push or open issues or pull requests.
Oldphaloskepsis/template-parts/content-page.php
2017-05-25 18:57:33 +00:00

49 lines
1.7 KiB
PHP

<?php
/**
* The template used for displaying page content
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header" id="post-header-image" style="background-image: url('<?php the_post_thumbnail_url(); ?>'); background-position: <?php if ($position = get_post_meta(get_the_ID(), 'Header Image Position', true)) echo $position; else echo 'centre'; ?>;">
<div id="post-header-details-container">
<div id="post-header-details">
<?php
if (strlen(get_the_title()) > 70) $small= "3em";
elseif (strlen(get_the_title()) > 35) $small = "4em";
elseif (strlen(get_the_title()) > 12) $small = "5em";
else $small = "6em"
?>
<h1 id="post-title" style="font-size: <?php echo $small ?>;">
<?php echo get_the_title(); ?>
</h1>
<?php the_date('F j, Y', '<p id="post-date">', '</p>'); ?>
</div>
</div>
</header><!-- .entry-header -->
<div id="body" class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php //twentysixteen_entry_meta(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->