-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
60 lines (38 loc) · 1.68 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php get_header(); ?>
<div class="content">
<div class="container">
<div class="row">
<div class="col-lg-9">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div class="blog-post">
<?php if(has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>">
<img src="<?php the_post_thumbnail_url('post_image'); ?>" alt="<?php the_title(); ?>" class="img-fluid mb-5" />
</a>
<?php endif; ?>
<a href="<?php the_permalink(); ?>"><h1><?php the_title(); ?></h1></a>
<?php the_excerpt(); ?>
</div>
<?php endwhile; else : endif; ?>
<div class="pagination">
<?php
global $wp_query;
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages
) );
?>
</div>
</div>
<div class="col-lg-3">
<div class="sticky-top" style="top: 50px;">
<?php dynamic_sidebar('blog-sidebar'); ?>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>