2023-01-21 01:31:34 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Singular
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Fictioneer
|
|
|
|
* @since 1.0
|
|
|
|
* @see comments.php
|
|
|
|
*/
|
|
|
|
|
2023-08-17 16:13:12 +02:00
|
|
|
|
2023-12-02 11:58:58 +01:00
|
|
|
// Setup
|
|
|
|
$post_id = get_the_ID();
|
|
|
|
|
2023-08-17 16:13:12 +02:00
|
|
|
// Header
|
|
|
|
get_header();
|
|
|
|
|
|
|
|
?>
|
2023-01-21 01:31:34 +01:00
|
|
|
|
|
|
|
<main id="main" class="main singular">
|
2024-04-14 12:57:59 +02:00
|
|
|
|
2024-06-14 00:31:31 +02:00
|
|
|
<?php do_action( 'fictioneer_main', 'singular' ); ?>
|
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, 'singular' );
|
2023-01-21 01:31:34 +01:00
|
|
|
$this_breadcrumb = [$title, get_the_permalink()];
|
|
|
|
?>
|
|
|
|
|
2024-08-12 02:42:45 +02:00
|
|
|
<article id="singular-<?php echo $post_id; ?>" class="singular__article">
|
2023-01-21 01:31:34 +01:00
|
|
|
|
|
|
|
<header class="singular__header">
|
|
|
|
<h1 class="singular__title"><?php echo $title; ?></h1>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<section class="singular__content content-section"><?php the_content(); ?></section>
|
|
|
|
|
|
|
|
<footer class="singular__footer"><?php do_action( 'fictioneer_singular_footer' ); ?></footer>
|
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
<?php do_action( 'fictioneer_before_comments' ); ?>
|
|
|
|
|
|
|
|
<?php if ( comments_open() && ! post_password_required() ) : ?>
|
2024-08-12 02:42:45 +02:00
|
|
|
<section class="singular__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
|
|
|
|
2023-01-21 01:31:34 +01:00
|
|
|
</main>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
// Footer arguments
|
|
|
|
$footer_args = array(
|
|
|
|
'post_type' => 'page',
|
2023-12-02 11:58:58 +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 );
|
|
|
|
?>
|