2023-01-21 01:31:34 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Single Post
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Fictioneer
|
|
|
|
* @since 1.0
|
|
|
|
*/
|
|
|
|
|
2023-08-17 16:13:12 +02:00
|
|
|
|
2024-05-10 01:26:09 +02:00
|
|
|
// Setup
|
|
|
|
$password_required = post_password_required();
|
|
|
|
|
2023-08-17 16:13:12 +02:00
|
|
|
// Header
|
|
|
|
get_header();
|
|
|
|
|
|
|
|
?>
|
2023-01-21 01:31:34 +01:00
|
|
|
|
|
|
|
<main id="main" class="main post">
|
2024-04-14 12:57:59 +02:00
|
|
|
|
2024-06-14 00:31:31 +02:00
|
|
|
<?php do_action( 'fictioneer_main', 'post' ); ?>
|
2024-04-14 12:57:59 +02:00
|
|
|
|
2023-01-21 01:31:34 +01:00
|
|
|
<div class="main__wrapper">
|
2024-04-14 12:57:59 +02:00
|
|
|
|
2023-01-21 01:31:34 +01:00
|
|
|
<?php do_action( 'fictioneer_main_wrapper' ); ?>
|
|
|
|
|
|
|
|
<?php while ( have_posts() ) : the_post(); ?>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
// Setup
|
2024-03-01 12:39:42 +01:00
|
|
|
$title = fictioneer_get_safe_title( $post->ID, 'single-post' );
|
2023-12-02 00:00:13 +01:00
|
|
|
$this_breadcrumb = [ $title, get_the_permalink() ];
|
2023-01-21 01:31:34 +01:00
|
|
|
?>
|
|
|
|
|
2024-08-12 02:42:45 +02:00
|
|
|
<article id="post-<?php the_ID(); ?>" class="post__article">
|
2023-01-21 01:31:34 +01:00
|
|
|
|
2024-10-14 11:40:05 +02:00
|
|
|
<?php do_action( 'fictioneer_post_article_open', $post->ID, array( 'context' => 'single-post' ) ); ?>
|
|
|
|
|
2023-01-21 01:31:34 +01:00
|
|
|
<header class="post__header">
|
2024-10-14 13:00:44 +02:00
|
|
|
<?php
|
|
|
|
$header_items = array(
|
|
|
|
'title' => '<h1 class="post__title">' . $title . '</h1>',
|
|
|
|
'meta' => '<div class="post__meta layout-links">' . fictioneer_get_post_meta_items() . '</div>'
|
|
|
|
);
|
|
|
|
|
|
|
|
$header_items = apply_filters(
|
|
|
|
'fictioneer_filter_post_header_items',
|
|
|
|
$header_items,
|
|
|
|
$post->ID,
|
|
|
|
array( 'context' => 'single-post' )
|
|
|
|
);
|
|
|
|
|
|
|
|
echo implode( '', $header_items );
|
|
|
|
?>
|
2023-01-21 01:31:34 +01:00
|
|
|
</header>
|
|
|
|
|
|
|
|
<section class="post__main content-section"><?php the_content(); ?></section>
|
|
|
|
|
2024-10-14 11:36:10 +02:00
|
|
|
<?php do_action( 'fictioneer_post_after_content', $post->ID, array( 'context' => 'single-post' ) ); ?>
|
2023-01-21 01:31:34 +01:00
|
|
|
|
2024-05-10 01:26:09 +02:00
|
|
|
<?php if ( ! $password_required && ( has_action( 'fictioneer_post_footer_left' ) || has_action( 'fictioneer_post_footer_right' ) ) ) : ?>
|
2023-01-21 01:31:34 +01:00
|
|
|
<footer class="post__footer">
|
2023-08-30 13:51:49 +02:00
|
|
|
<div class="post__footer-box post__footer-left">
|
2024-10-14 11:36:10 +02:00
|
|
|
<?php do_action( 'fictioneer_post_footer_left', $post->ID, array( 'context' => 'single-post' ) ); ?>
|
2023-08-30 13:51:49 +02:00
|
|
|
</div>
|
|
|
|
<div class="post__footer-box post__footer-right">
|
2024-10-14 11:36:10 +02:00
|
|
|
<?php do_action( 'fictioneer_post_footer_right', $post->ID, array( 'context' => 'single-post' ) ); ?>
|
2023-08-30 13:51:49 +02:00
|
|
|
</div>
|
2023-01-21 01:31:34 +01:00
|
|
|
</footer>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
<?php do_action( 'fictioneer_before_comments' ); ?>
|
|
|
|
|
2024-05-10 01:26:09 +02:00
|
|
|
<?php if ( comments_open() && ! $password_required ) : ?>
|
2024-08-12 02:42:45 +02:00
|
|
|
<section class="post__comments comment-section">
|
2023-01-21 01:31:34 +01:00
|
|
|
<?php comments_template(); ?>
|
|
|
|
</section>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php endwhile; ?>
|
2024-04-14 12:57:59 +02:00
|
|
|
|
2023-01-21 01:31:34 +01:00
|
|
|
</div>
|
2024-04-14 12:57:59 +02:00
|
|
|
|
2024-09-07 16:57:34 +02:00
|
|
|
<?php do_action( 'fictioneer_main_end', 'post' ); ?>
|
|
|
|
|
2023-01-21 01:31:34 +01:00
|
|
|
</main>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
// Footer arguments
|
|
|
|
$footer_args = array(
|
|
|
|
'post_type' => 'post',
|
2023-12-02 00:00:13 +01:00
|
|
|
'post_id' => $post->ID,
|
2023-01-21 01:31:34 +01:00
|
|
|
'breadcrumbs' => array(
|
|
|
|
[fcntr( 'frontpage' ), get_home_url()]
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
// Add current breadcrumb
|
|
|
|
$footer_args['breadcrumbs'][] = $this_breadcrumb;
|
|
|
|
|
|
|
|
// Get footer with breadcrumbs
|
|
|
|
get_footer( null, $footer_args );
|
|
|
|
?>
|