-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patharchive.php
98 lines (65 loc) · 2.79 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/**
* The template for displaying archive pages.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package understrap-builder
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
// Load Customizer variables
$understrap_builder_container_type = get_theme_mod( 'understrap_builder_container_type', 'container');
$understrap_builder_container_archive_type = get_theme_mod( 'understrap_builder_container_archive_type', 'default');
$understrap_builder_headers_archive = get_theme_mod( 'understrap_builder_headers_archive', '');
global $us_b_title_shown_already;
$us_b_title_shown_already = false;
// Handle container
if($understrap_builder_container_archive_type != 'default'){
$understrap_builder_container_type = $understrap_builder_container_archive_type;
}
?>
<?php get_template_part( 'global-templates/breadcrumbs-archive-check'); ?>
<?php get_template_part( 'global-templates/headers-archive-check' ); ?>
<div class="wrapper" id="archive-wrapper">
<div class="<?php echo esc_attr( $understrap_builder_container_type ); ?>" id="content" tabindex="-1">
<div class="row">
<!-- Do the left sidebar check -->
<?php get_template_part( 'global-templates/left-sidebar-check' ); ?>
<div class="col">
<main class="site-main" id="main">
<div class="row">
<?php if ( have_posts() ) : ?>
<?php if(!$us_b_title_shown_already){ ?>
<div class="col-12 mb-4">
<header class="page-header<?php if($understrap_builder_headers_archive == 'centered'){ echo ' text-center';}?>">
<?php
if(!$us_b_title_shown_already){ the_archive_title( '<h1 class="page-title">', '</h1>' ); }
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->
</div>
<?php } ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'loop-templates/content', get_post_format() ); ?>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
<?php endif; ?>
<?php if(show_posts_nav()){ ?>
<div class="col-12 my-4">
<!-- The pagination component -->
<?php understrap_pagination(); ?>
</div>
<?php } ?>
</div>
</main><!-- #main -->
</div>
<!-- Do the right sidebar check -->
<?php get_template_part( 'global-templates/right-sidebar-check' ); ?>
</div> <!-- .row -->
</div><!-- #content -->
</div><!-- #archive-wrapper -->
<?php get_footer(); ?>