-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwoocommerce.php
43 lines (41 loc) · 1.26 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
<?php get_header(); ?>
<?php
if(!is_front_page()) {
$shop_page_id = get_option( 'woocommerce_shop_page_id' );
if(is_shop()) {
seed_banner_title($shop_page_id);
} else {
seed_banner_title(get_the_ID());
}
}
$css_class = '';
if($GLOBALS['s_shop_layout'] != 'full-width') {
$css_class = ' -' . $GLOBALS['s_shop_layout'] . ' -shopbar';
}
?>
<div class="s-container main-body <?php echo $css_class; ?>">
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php
if(is_shop() && !(is_search()) && ($GLOBALS['s_shop_pagebuilder'] == 'enable')) {
/* Use Shop Page instead of Archive Product */
edit_post_link('Edit', '<span class="edit-link">','</span>', $shop_page_id);
$the_query = new WP_Query( array( 'page_id' => $shop_page_id ));
while ( $the_query->have_posts() ) : $the_query->the_post();
the_content();
endwhile;
wp_reset_postdata();
} else {
woocommerce_content();
if (is_shop()) {
edit_post_link('Edit', '<span class="edit-link">','</span>', $shop_page_id);
} else {
seed_entry_footer();
}
}
?>
</main>
</div>
<?php if($GLOBALS['s_shop_layout'] != 'full-width') get_sidebar('shop'); ?>
</div>
<?php get_footer(); ?>