2018-03-21 18:19:20 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The template part for displaying single Posts.
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Omphaloskepsis
|
|
|
|
* @since Omphaloskepsis 1.0
|
|
|
|
*/
|
|
|
|
?>
|
|
|
|
|
|
|
|
<article id="wrapper" <?php post_class(); ?>>
|
|
|
|
<header style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
|
|
|
|
<div>
|
2020-08-08 09:55:20 +00:00
|
|
|
<h1 id="post-title"><?php echo get_the_title(); ?></h1>
|
|
|
|
<?php if ($subtitle = get_post_meta(get_the_ID(), 'Subtitle', true)): ?>
|
|
|
|
<h2 id="post-subtitle"><?php echo $subtitle ?></h2>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php //the_date('F j\<\s\u\p\>S\<\/\s\u\p\>, 1,Y \H\.\E\.', '<h3>', '</h3>'); ?>
|
2018-03-21 18:19:20 +00:00
|
|
|
</div>
|
|
|
|
</header><!-- .entry-header -->
|
|
|
|
|
|
|
|
<main id="post-body" class="body">
|
2020-08-08 09:55:20 +00:00
|
|
|
<?php $date1 = strtotime(get_the_date('Y-m-d')); ?>
|
|
|
|
<?php $date2 = strtotime(date('Y-m-d')); ?>
|
|
|
|
<?php if (has_category('series') || has_tag('ohwhatohjeez') || get_post_meta(get_the_ID(), 'Note(s)', true) || get_post_meta(get_the_ID(), 'License', true) || ($date1 < $date2 - 31557600)): ?>
|
2018-03-21 18:19:20 +00:00
|
|
|
<div id="details">
|
|
|
|
<ul>
|
|
|
|
<?php
|
|
|
|
if (has_category('thoughts')) $type = "thought";
|
|
|
|
else if (has_category('reports')) $type = "report";
|
|
|
|
else if (has_category('review')) $type = "review";
|
|
|
|
|
|
|
|
if (has_category('series')) {
|
|
|
|
$catag = "is a part of the following series";
|
|
|
|
$series = [];
|
|
|
|
$s = get_category_by_slug('series');
|
|
|
|
$seriesIDs = get_term_children($s->term_id, 'category');
|
|
|
|
|
|
|
|
foreach ($seriesIDs as $thisSeriesID) {
|
|
|
|
if (has_category($thisSeriesID)) {
|
|
|
|
array_push($series, get_category($thisSeriesID));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (count($series) > 1) $catag .= "’";
|
|
|
|
$punct = ":";
|
|
|
|
foreach ($series as $thisSeries) {
|
|
|
|
$catag .= $punct.' ';
|
|
|
|
if ($punct == ":") $punct = ";";
|
|
|
|
$catag .= '<a href="/category/series/'.$thisSeries->slug.'">'.$thisSeries->name.'</a>';
|
|
|
|
}
|
|
|
|
$catag .= '.';
|
2020-08-08 09:55:20 +00:00
|
|
|
|
|
|
|
echo "<li>This <a href='/category/{$type}s'>{$type}</a> {$catag}</li>";
|
2018-03-21 18:19:20 +00:00
|
|
|
}
|
|
|
|
?>
|
2020-08-08 09:55:20 +00:00
|
|
|
|
|
|
|
<?php if ($date1 < $date2 - 31557600): ?>
|
|
|
|
<li>This piece was written over a year ago. It may no longer accurately reflect my views now, or may be factually outdated.</li>
|
|
|
|
<?php endif; ?>
|
2018-03-21 18:19:20 +00:00
|
|
|
<?php if (has_tag('ohwhatohjeez')): ?>
|
|
|
|
<li>This piece was originally written for my old site, Oh What? Oh Jeez! 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).</li>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($notes = get_post_meta(get_the_ID(), 'Note(s)', true)): ?>
|
2020-08-08 09:55:20 +00:00
|
|
|
<li><?php echo $notes ?></li>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($license = get_post_meta(get_the_ID(), 'License', true)): ?>
|
|
|
|
<li>This work is licensed under <?php echo $license ?>. <a href="https://bengoldsworthy.uk/2018/03/copywrong/">Sorry about that</a>.</li>
|
2018-03-21 18:19:20 +00:00
|
|
|
<?php endif; ?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
if (get_the_content()):
|
|
|
|
the_content();
|
|
|
|
else:
|
|
|
|
echo get_the_excerpt();
|
|
|
|
endif;
|
|
|
|
?>
|
|
|
|
</main><!-- .entry-content -->
|
2020-08-08 09:55:20 +00:00
|
|
|
|
|
|
|
<footer id="post-toc">
|
|
|
|
<?php if ($content = get_post_meta(get_the_ID(), 'ToC1', true)): ?>
|
|
|
|
<h1>Contents</h1>
|
|
|
|
<ol>
|
|
|
|
<?php $i = 1; ?>
|
|
|
|
<?php while($content = get_post_meta(get_the_ID(), 'ToC'.$i, true)): ?>
|
|
|
|
<li><a href="#section-<?php echo $i++ ?>"><?php echo $content ?></a></li>
|
|
|
|
<?php endwhile; ?>
|
|
|
|
</ol>
|
|
|
|
<?php endif; ?>
|
|
|
|
</footer>
|
2018-03-21 18:19:20 +00:00
|
|
|
</article><!-- #post-## -->
|