fictioneer/singular-canvas-site.php

52 lines
866 B
PHP
Raw Normal View History

2024-06-11 21:34:36 +02:00
<?php
/**
* Template Name: Canvas (Site)
*
* @package WordPress
* @subpackage Fictioneer
* @since 5.20.0
*/
// Setup
$post_id = get_the_ID();
// Header
get_header( null, array( 'blank' => 1 ) );
?>
2024-08-12 02:42:45 +02:00
<main id="main" class="canvas canvas-site">
2024-06-11 21:34:36 +02:00
<?php
while ( have_posts() ) {
the_post();
// Setup
$title = fictioneer_get_safe_title( $post_id, 'singular-canvas-site' );
2024-06-11 21:34:36 +02:00
$this_breadcrumb = [ $title, get_the_permalink() ];
the_content();
}
?>
</main>
<?php
// Footer arguments
$footer_args = array(
'blank' => 1,
'post_type' => 'page',
'post_id' => $post_id,
'breadcrumbs' => array(
[fcntr( 'frontpage' ), get_home_url()]
)
);
// Add current breadcrumb
$footer_args['breadcrumbs'][] = $this_breadcrumb;
// Get footer with breadcrumbs
get_footer( null, $footer_args );
?>