forked from binjuhor/simple-wp-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
executable file
·45 lines (36 loc) · 999 Bytes
/
archive.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* The template for displaying archive pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage xDev-theme
* @since xDev-theme 1.0.0
*/
get_header();
$description = get_the_archive_description();
?>
<main class="main-content">
<div class="section-heading">
<div class="container-fluid">
<h1><?php the_archive_title( '', '' ); ?></h1>
<?php echo wp_kses_post( wpautop( $description ) ); ?>
</div>
</div>
<?php if ( have_posts() ) : ?>
<div class="main-content__inner">
<div class="post__list">
<?php while ( have_posts() ) : ?><?php the_post(); ?>
<?php get_template_part( 'template-parts/content/content' ); ?>
<?php endwhile; ?>
</div>
</div>
<?php get_template_part( 'template-parts/pagination' ); ?>
<?php else : ?>
<div class="main-content__inner">
<?php get_template_part( 'template-parts/content/content-none' ); ?>
</div>
<?php endif; ?>
</main>
<?php get_footer(); ?>