-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.php
32 lines (30 loc) · 1.15 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
<?php get_header(); ?>
<main role="main" aria-label="Content">
<div class="container mt-4 mb-5">
<?php if ( have_posts() ) : ?>
<?php
while ( have_posts() ) : the_post();
$index = $wp_query->current_post + 1;
?>
<article class="row">
<div class="col-12 col-md-6 p-0 <?php echo $index % 2 === 0 ? 'order-md-last' : ''; ?>">
<a href="<?php echo get_the_permalink(); ?>">
<img v-lazy="'<?php echo get_the_post_thumbnail_url(); ?>'" class="img-fluid" alt="<?php echo get_the_title(); ?>">
</a>
</div>
<div class="col-12 col-md-6 p-0 bg-primary d-flex d-flex-column justify-content-center align-items-center text-center">
<div class="p-5">
<h3 class="text-white"><?= get_the_title(); ?></h3>
<p class="text-white"><?= get_the_excerpt(); ?></p>
<a href="<?= get_the_permalink(); ?>" class="btn btn-light text-uppercase">Read more</a>
</div>
</div>
</article>
<?php
endwhile;
bootstrap_pagination();
endif;
?>
</div>
</main>
<?php get_footer();