This repository was archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy patharchive.php
More file actions
59 lines (51 loc) · 1.36 KB
/
archive.php
File metadata and controls
59 lines (51 loc) · 1.36 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
$postcount = 1;
$default_posts_per_page = get_option( 'posts_per_page' );
get_header();
?>
<main id="main" role="main">
<section class="news-section section--grey section section--small" aria-label="<?php echo esc_attr( /* translators: List of posts */ __( 'Results', 'benenson' ) ); ?>">
<div class="container">
<?php get_template_part( 'partials/archive-header' ); ?>
<div class="postlist-wrapper">
<aside class="postlist-filters">
<?php get_sidebar(); ?>
</aside>
<div class="postlist postlist--hasSidebar">
<?php
while ( have_posts() ) :
the_post();
$has_featured = benenson_featured_image();
if ( 1 === $postcount ) :
$style = 'small';
?>
<div class="postrow postrow--compact">
<?php
elseif ( 3 === $postcount ) :
$style = 'horizontal';
?>
<div class="postrow postrow--tall">
<div class="post-wrapper">
<?php
endif;
get_template_part( 'partials/post/post', $style );
$postcount++;
if ( $postcount >= $default_posts_per_page ) :
?>
</div>
</div>
<?php
elseif ( 3 === $postcount ) :
?>
</div>
<?php
endif;
endwhile;
?>
</div>
</div>
</div>
</section>
<?php get_template_part( 'partials/pagination' ); ?>
</main>
<?php get_footer(); ?>