-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfooter.php
More file actions
125 lines (109 loc) · 3.89 KB
/
footer.php
File metadata and controls
125 lines (109 loc) · 3.89 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package mtminimag
*/
?>
</div><!-- main-content -->
<!-- Sidebar-right -->
<?php
/* Right Sidebar */
// Metabox Sidebar Status (Gutenberg)
$metabox_sidebar_status = get_post_meta(get_the_ID(), 'mtminimag-sidebar-status', true) ? get_post_meta(get_the_ID(), 'mtminimag-sidebar-status', true) : "default";
// Post Level
if(is_single()) :
if ( $metabox_sidebar_status == "default" ) {
if ( getOption('defaults', 'singlepost_sidebar') == 'default' ) {
if ( getOption('defaults', 'default_sidebar') == 'right' ) {
get_template_part( 'template-parts/sidebar/sidebar', 'right' );
}
} elseif ( getOption('defaults', 'singlepost_sidebar') == 'right') {
get_template_part( 'template-parts/sidebar/sidebar', 'right' );
}
}
elseif ( $metabox_sidebar_status == "right" ) {
get_template_part( 'template-parts/sidebar/sidebar', 'right' );
}
endif;
// Page Level
if(is_page()) :
if( $metabox_sidebar_status == "default" ) {
if ( getOption('defaults', 'singlepage_sidebar') == 'default' ) {
if ( getOption('defaults', 'default_sidebar') == 'right' ) {
get_template_part( 'template-parts/sidebar/sidebar', 'right' );
}
} elseif ( getOption('defaults', 'singlepage_sidebar') == 'right') {
get_template_part( 'template-parts/sidebar/sidebar', 'right' );
}
}
elseif( $metabox_sidebar_status == "right" ) {
get_template_part( 'template-parts/sidebar/sidebar', 'right' );
}
endif;
// Homepage level
if( is_home() ) :
if ( getOption('defaults', 'archive_sidebar') == 'default' ) {
if ( getOption('defaults', 'default_sidebar') == 'right' ) {
get_template_part( 'template-parts/sidebar/sidebar', 'right' );
}
} elseif ( getOption('defaults', 'archive_sidebar') == 'right') {
get_template_part( 'template-parts/sidebar/sidebar', 'right' );
}
endif;
// Homepage Widget Position (Bottom)
if ( is_home() && is_active_sidebar('home_widget_bottom') ) :
?>
<div class="home-bottom-widget-area col-12">
<?php dynamic_sidebar('home_widget_bottom'); ?>
</div>
<?php
endif;
?>
</div><!-- component-area-inner -->
</div> <!-- container -->
</section> <!-- component-area -->
</div> <!-- big-container -->
<!-- Footer -->
<div class="footer py-3 py-md-5">
<div class="container">
<div class="d-flex align-items-center justify-content-between">
<div class="copyright">
<?php mtminimag_footer_info(); ?>
</div>
<?php get_template_part( 'template-parts/social', 'profiles' ); ?>
</div>
</div>
</div>
<?php if ( getOption('defaults', 'show_search') ) : ?>
<!-- Header Search Modal -->
<div id="search-content" class="search-content <?php echo ( getOption('defaults', 'show_search_mobile') ? '' : 'd-none d-sm-block' ); ?>">
<button type="button" class="close">⨯</button>
<form role="search" method="get" class="header-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<input name="s" type="search" placeholder="Type here..." class="search-field" id="search">
</form>
</div>
<?php endif; ?>
<?php
// Offcanvas
if ( getOption('defaults', 'enable_offcanvas') ) :
get_template_part('template-parts/offcanvas', 'section');
endif;
?>
<?php wp_footer(); ?>
<?php if ( getOption('defaults', 'space_before_body') ) : ?>
<div class="space-before-body-code">
<?php echo wp_kses_post(getOption('defaults', 'space_before_body')); ?>
</div>
<?php endif; ?>
</body>
<?php
if ( getOption('defaults', 'tracking_code') ) :
echo wp_kses_post(getOption('defaults', 'tracking_code'));
endif;
?>
</html>