-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
75 lines (61 loc) · 3.08 KB
/
index.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php get_header(); ?>
<main>
<section class="page-header text-center">
<div class="container">
<div class="page-banner">
<i class="icon ion-md-create page-header__icon"></i>
<h1 class="page-header__title">Blog</h1>
<p class="page-header__text">Read our latest Posts</p>
</div>
</div>
</section>
<!-- blogs -->
<section class="blogs">
<div class="row mx-auto justify-content-center">
<div class="col-lg-8 col-md-10 col-11">
<?php if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div class="card card-custom-blog">
<?php if(has_post_thumbnail()) : ?>
<div class="blogs__image" style="background-image: url('<?php the_post_thumbnail_url(); ?>')"></div>
<?php else: ?>
<div class="blogs__image"></div>
<?php endif; ?>
<div class="card-body">
<div class="blogs__meta">
<span><?php the_date('M d, Y') ?></span>
</div>
<div class="blogs__content">
<a class="blogs__content--title" href="#">
<h2><?php the_title(); ?></h2>
</a>
<p class="blogs__content--excerpt">
<?php echo wp_trim_words(get_the_content(), 60); ?>
</p>
<a href="<?php the_permalink(); ?>" class="btn-custom btn-secondary-custom btn-normal-custom box-shadow-btn mt-2">
Learn More <i class="btn-ic icon ion-md-arrow-forward"></i>
</a>
</div>
</div>
</div>
<?php endwhile; ?>
<div class="pagination-box text-center m-auto">
<?php
$paginations_args = array(
'mid_size' => 1,
'prev_text' => _x('«', 'previous set of posts'),
'next_text' => _x('»', 'next set of posts'),
'screen_reader_text' => __('Posts navigation'),
);
echo the_posts_pagination($paginations_args); ?>
</div>
<?php else : ?>
<div class="card mb-4">
<h1>Write something awesome ..</h1>
</div>
<?php endif; ?>
</div>
</div>
</section>
</main>
<?php get_footer(); ?>