-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.php
74 lines (62 loc) · 2.62 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
<?php
/*
================================================================================================
The main template file. This is the most generic template file in a WordPress theme
and one of the two required files for a theme (the other being style.css).
It is used to display a page when nothing more specific matches a query.
E.g., it puts together the home page when no home.php file exists.
================================================================================================
@package Maria
@link @link https://codex.wordpress.org/Template_Hierarchy
@copyright Copyright (C) 2017. Samuel Guebo
@license GNU General Public License v2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
@author Samuel Guebo (https://samuelguebo.co/)
================================================================================================
*/
get_header();
// Make sure Kirki is activated
if ( class_exists( 'Kirki' ) ):
// require slider
get_template_part ('slider');
// services section
get_template_part('template-parts/section-services');
// blog section
get_template_part('template-parts/section-blog');
else:
?>
<div class="post-list clearfix">
<div class="row" >
<div class="main-row no-padding-top" >
<div class="columns large-12 category-header no-padding">
<h4 class="category-title">
<?php _e('Recent posts');?>
</h4>
</div><!--header/-->
</div><!--main-row/-->
</div><!--row/-->
<?php
if ( have_posts() ) :
/* Start the Loop */
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; // for pagination purpose
while ( have_posts() ) : the_post();
if(has_post_thumbnail()){
maria_get_template_part('template-parts/content-article.php', 'large-4 medium-6 small-12', 'post-thumb');
}else {
maria_get_template_part('template-parts/content-article-without-thumb.php', 'large-4 medium-6 small-12', 'post-thumb');
}
endwhile;
else :
get_template_part( 'template-parts/content', '404' );
endif; ?>
</div>
<div class="pagination-wrapper columns large-4 large-centered" >
<?php the_posts_pagination( array(
'mid_size' => 2,
'prev_text' => __( '«', 'maria' ),
'next_text' => __( '»', 'maria' ),
'screen_reader_text' => ' '
) ); ?>
</div>
<?php
endif;
get_footer();