-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.php
More file actions
28 lines (25 loc) · 837 Bytes
/
archive.php
File metadata and controls
28 lines (25 loc) · 837 Bytes
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
<?php get_header(); ?>
<div class="page-wrapper">
<header class="mt-8">
<?php the_archive_title( '<h1 class="text-3xl font-medium">', '</h1>' ); ?>
</header>
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8 mt-8">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
$post_format = get_post_format();
if ( is_archive() || is_home() ) {
get_template_part( 'template-parts/content', 'archive' );
} else if ( $post_format ) {
get_template_part( 'template-parts/content', $post_format );
} else {
get_template_part( 'template-parts/content', get_post_type() );
}
}
}
?>
</div>
</div>
<?php
get_footer();