-
Notifications
You must be signed in to change notification settings - Fork 4
/
archive.php
65 lines (58 loc) · 3.02 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
61
62
63
64
65
<?php
/*
================================================================================================
The archive template file
================================================================================================
@link @link https://codex.wordpress.org/Template_Hierarchy
@package Maria
@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(); ?>
<section class="single-cover"
style="background-image:url(<?php echo esc_url(get_header_image());?>); background-position:center center;">
<div class="overlay">
<h3 class="center title">
<?php echo the_archive_title();?>
</h3>
</div>
</section>
<section id="breadcrumbs" >
<div class="breadcrumbs">
<?php if (function_exists('maria_custom_breadcrumbs')) maria_custom_breadcrumbs(); ?>
</div>
</section>
<section class="category-row row">
<!-- post list-->
<section class="large-8 columns main-column">
<div class="post-list clearfix">
<?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-6 medium-6 small-12', 'post-thumb');
}else {
maria_get_template_part('template-parts/content-article-without-thumb.php', 'large-6 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>
</section>
<?php get_sidebar();?>
</section>
<?php
get_footer();