marianne_wordpress_theme/index.php

45 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2021-02-18 11:03:46 +00:00
<?php
/**
* The main template file.
2021-02-18 11:03:46 +00:00
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Marianne
* @since Marianne 1.0
*/
get_header();
?>
<div id="content" class="site-content">
<main id="primary" class="site-primary" role="main">
<?php if ( is_archive() ) : ?>
<header class="archive-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
2021-03-19 18:35:27 +00:00
$marianne_description = get_the_archive_description();
if ( $marianne_description ) {
2021-02-18 11:03:46 +00:00
?>
<div class="archive-description">
2021-03-19 18:35:27 +00:00
<?php echo wp_kses_post( wpautop( $marianne_description ) ); ?>
2021-02-18 11:03:46 +00:00
</div>
<?php
}
?>
</header>
<?php endif; ?>
<?php get_template_part( 'loop' ); ?>
</main>
</div>
<?php
get_sidebar();
2021-02-18 11:03:46 +00:00
get_footer();