forked from educatorplugin/ib-educator
/
woocommerce.php
64 lines (52 loc) · 1.31 KB
/
woocommerce.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
<?php get_header(); ?>
<section id="section-breadcrumbs" class="section-content">
<div class="container">
<?php
woocommerce_breadcrumb( array(
'wrap_before' => '<nav class="woocommerce-breadcrumb">',
'wrap_after' => '</nav>',
) );
?>
</div>
</section>
<section class="section-content">
<div class="container clearfix">
<?php if ( is_product() ) : ?>
<div class="main-content">
<?php woocommerce_content(); ?>
</div>
<?php get_sidebar( 'shop' ); ?>
<?php else : ?>
<?php
$layout = get_theme_mod( 'shop_layout', 'default' );
if ( 'default' == $layout ) {
echo '<div class="main-content">';
}
?>
<div id="page-title">
<h1><?php woocommerce_page_title(); ?></h1>
<?php
if ( is_shop() ) {
$subtitle = apply_filters( 'edutheme_subtitle', '' );
if ( ! empty( $subtitle ) ) {
echo $subtitle;
} else {
$subtitle = get_post_meta( wc_get_page_id( 'shop' ), '_educator_subtitle', true );
if ( $subtitle ) {
echo '<div class="subtitle">' . esc_html( $subtitle ) . '</div>';
}
}
}
?>
</div>
<?php woocommerce_content(); ?>
<?php
if ( 'default' == $layout ) {
echo '</div>';
get_sidebar( 'shop' );
}
?>
<?php endif; ?>
</div>
</section>
<?php get_footer(); ?>