-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpage.php
More file actions
122 lines (116 loc) · 2.86 KB
/
Copy pathpage.php
File metadata and controls
122 lines (116 loc) · 2.86 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
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Cream_Blog
*/
get_header();
$cream_blog_has_sidebar_active = '';
$cream_blog_sidebar_position = cream_blog_sidebar_position();
$cream_blog_main_class = cream_blog_main_class();
if (
'none' !== $cream_blog_sidebar_position &&
is_active_sidebar( 'sidebar' )
) {
$cream_blog_has_sidebar_active = 'has-sidebar';
}
?>
<div class="cb-container">
<div class="cb-mid-wrap cb-innerpage-mid-wrap cb-default-page-wrap <?php echo esc_attr( $cream_blog_has_sidebar_active ); ?>">
<?php
/**
* Hook - cream_blog_breadcrumb.
*
* @hooked cream_blog_breadcrumb_action - 10
*/
do_action( 'cream_blog_breadcrumb' );
?>
<div class="row">
<?php
if ( class_exists( 'WooCommerce' ) ) {
if (
is_cart() ||
is_checkout() ||
is_account_page()
) {
if (
'left' === $cream_blog_sidebar_position &&
is_active_sidebar( 'woocommerce-sidebar' )
) {
cream_blog_woocommerce_sidebar();
}
} else {
if (
'left' === $cream_blog_sidebar_position &&
is_active_sidebar( 'sidebar' )
) {
get_sidebar();
}
}
} else {
if (
'left' === $cream_blog_sidebar_position &&
is_active_sidebar( 'sidebar' )
) {
get_sidebar();
}
}
?>
<div class="<?php echo esc_attr( $cream_blog_main_class ); ?>">
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
}
?>
</main><!-- #main.site-main -->
</div><!-- #primary.content-area -->
</div>
<?php
if ( class_exists( 'WooCommerce' ) ) {
if (
is_cart() ||
is_checkout() ||
is_account_page()
) {
if (
'right' === $cream_blog_sidebar_position &&
is_active_sidebar( 'woocommerce-sidebar' )
) {
cream_blog_woocommerce_sidebar();
}
} else {
if (
'right' === $cream_blog_sidebar_position &&
is_active_sidebar( 'sidebar' )
) {
get_sidebar();
}
}
} else {
if (
'right' === $cream_blog_sidebar_position &&
is_active_sidebar( 'sidebar' )
) {
get_sidebar();
}
}
?>
</div><!-- .row -->
</div><!-- .cb-mid-wrap.cb-innerpage-mid-wrap.cb-default-page-wrap -->
</div><!-- .cb-container -->
<?php
get_footer();