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-single.php

71 lines
2.8 KiB
PHP
Raw Normal View History

2017-04-11 07:22:35 +00:00
<?php
/**
* The template part for displaying single posts
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
2017-05-25 18:57:33 +00:00
<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'; ?>;">
2017-04-11 07:22:35 +00:00
<div id="post-header-details-container">
<div id="post-header-details">
2017-05-25 18:57:33 +00:00
<?php
2017-04-11 07:22:35 +00:00
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 ?>;">
2017-05-25 18:57:33 +00:00
<?php echo get_the_title(); ?>
2017-04-11 07:22:35 +00:00
<?php if ($versionNum = get_post_meta(get_the_ID(), 'Version', true)): ?>
<span id="version"><?php echo $versionNum ?></span>
<?php endif; ?>
</h1>
<?php the_date('F j, Y', '<p id="post-date">', '</p>'); ?>
<?php /*
<?php if ($posttags = get_the_tags()): ?>
<div id="post-tags">
<?php foreach ($posttags as $tag): ?>
<a class="hyperlink-button" href="<?php echo $tag->slug ?>"><?php echo $tag->name ?></a>
<?php endforeach; ?>
<?php endif; ?>
*/ ?>
</div>
</div>
</header><!-- .entry-header -->
<div id="body" class="entry-content">
2017-05-25 18:57:33 +00:00
<?php if (has_tag('ohwhatohjeez')): ?>
<div class="note">
<p>This piece was originally written for my old site, <a href="/website/oh-what-oh-jeez">Oh What? Oh Jeez!</a> As such, it may not have transferred over properly and some images and links might be broken (and, to a lesser extent, my writing from years ago is about 80% run-on sentences).</p>
</div>
<?php endif; ?>
2017-04-11 07:22:35 +00:00
<?php
if (get_the_content()):
the_content();
else : echo get_the_excerpt();
endif;
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>',
) );
if ( '' !== get_the_author_meta( 'description' ) ) {
get_template_part( 'template-parts/biography' );
}
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php //twentysixteen_entry_meta(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->