-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
83 lines (72 loc) · 2.43 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
76
77
78
79
80
81
82
83
<?php get_header(); ?>
<main>
<div class="featured-posts">
<?php
$args = array(
'posts_per_page' => 10,
'meta_key' => 'featured',
'meta_value' => true
);
$the_query = new WP_Query($args);
if ($the_query->have_posts()) : while($the_query->have_posts()) : $the_query->the_post(); ?>
<div class="featured-posts__item">
<?php
$attr = array(
'class' => "img-fluid",
'alt' => get_the_title()
);
the_post_thumbnail('slider-thumbnail',$attr); ?>
<div class="featured-posts__item-content">
<h4 class="mb-0"><a href="<?php echo get_permalink(); ?>"><?php the_title();?></a></h4>
<div class="featured-posts__item-excerpt">
<p class="mb-0"><?php the_excerpt(); ?></p>
<a href="<?php echo get_permalink(); ?>">
<b>
<?php _e('See more', 'nenemi_button_element'); ?>
<svg class="icon small">
<use xlink:href="<?php echo get_template_directory_uri(); ?>/img/symbol-defs.svg#icon-arrow-right"></use>
</svg>
</b>
</a>
</div>
</div>
</div>
<?php endwhile;
endif; ?>
</div>
<div class="container pt-5">
<div class="row">
<div class="col-md-8">
<h2>
<small class="font-weight-normal font-family-base"><?php _e('CHECK OUT OUR', 'nenemi_index_page'); ?></small><br>
<?php _e('LATEST ARTICLES', 'nenemi_index_page'); ?>
</h2>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<article class="post">
<a href="<?php echo get_permalink(); ?>"><img src="<?php the_post_thumbnail_url(); ?>" alt="<?php the_title(); ?>" class="img-fluid mb-2"></a>
<h3 class="post__title"><a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></h3>
<small class="post__date"><?php the_time('j F, Y');?></small>
<p><?php echo get_the_excerpt();?></p>
<hr>
</article>
<?php
endwhile;
endif; ?>
<div class="mb-5">
<?php
$anchors = html5wp_pagination();
echo '<nav><ul class="pagination">';
foreach ((array) $anchors as $link){
echo '<li class="page-item page-link">' . $link . '</li>';
}
echo '</ul></nav>';
?>
</div>
</div>
<div class="col-md-4">
<?php dynamic_sidebar('blog_widgets'); ?>
</div>
</div>
</div>
</main>
<?php get_footer(); ?>