This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Omphaloskepsis/template-parts/content-page.php

31 lines
755 B
PHP
Raw Normal View History

2018-03-21 18:19:20 +00:00
<?php
/**
2021-01-09 11:13:06 +00:00
* The template used for displaying page content.
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
2018-03-21 18:19:20 +00:00
?>
<article id="wrapper" <?php post_class(); ?>>
<header style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
2021-01-09 11:13:06 +00:00
<div>
2018-03-21 18:19:20 +00:00
<h1 id="post-title"><?php echo get_the_title(); ?></h1>
2021-01-09 11:13:06 +00:00
<?php if ( $subtitle = get_post_meta( get_the_ID(), 'Subtitle', true ) ) : ?>
<h2 id="post-subtitle"><?php echo $subtitle; ?></h2>
<?php endif; ?>
</div>
2018-03-21 18:19:20 +00:00
</header><!-- .entry-header -->
<main id="page-body" class="body">
2021-01-09 11:13:06 +00:00
<?php
if ( get_the_content() ) :
the_content();
else :
echo get_the_excerpt();
2018-03-21 18:19:20 +00:00
endif;
2021-01-09 11:13:06 +00:00
?>
2018-03-21 18:19:20 +00:00
</main><!-- .entry-content -->
</article><!-- #post-## -->