-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent-shop.php
72 lines (65 loc) · 2.39 KB
/
content-shop.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
<?php
/**
* The template used for displaying page content in blog
*/
$thesod_item_data = array(
'sidebar_position' => '',
'sidebar_sticky' => '',
'blog_style' => 'default',
'blog_post_per_page' => '',
'blog_categories' => '',
'blog_post_types' => '',
'blog_pagination' => ''
);
$thesod_item_data = thesod_get_post_data($thesod_item_data, 'page', get_the_ID());
$thesod_sidebar_position = thesod_check_array_value(array('', 'left', 'right'), $thesod_item_data['sidebar_position'], '');
$thesod_sidebar_stiky = $thesod_item_data['sidebar_sticky'] ? 1 : 0;
$thesod_panel_classes = array('panel', 'row');
$thesod_center_classes = 'panel-center';
$thesod_sidebar_classes = '';
if(is_active_sidebar('shop-sidebar') && $thesod_sidebar_position) {
$thesod_panel_classes[] = 'panel-sidebar-position-'.$thesod_sidebar_position;
$thesod_panel_classes[] = 'with-sidebar';
$thesod_center_classes.= ' col-lg-9 col-md-9 col-sm-12';
if($thesod_sidebar_position == 'left') {
$thesod_center_classes .= ' col-md-push-3 col-sm-push-0';
$thesod_sidebar_classes .= ' col-md-pull-9 col-sm-pull-0';
}
} else {
$thesod_center_classes .= ' col-xs-12';
}
if($thesod_sidebar_stiky) {
$thesod_panel_classes[] = 'panel-sidebar-sticky';
wp_enqueue_script('thesod-sticky');
}
?>
<div class="block-content">
<div class="container">
<div class="<?php echo esc_attr(implode(' ', $thesod_panel_classes)); ?>">
<div class="<?php echo esc_attr($thesod_center_classes); ?>">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'thesod' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
</div>
<?php
if(is_active_sidebar('shop-sidebar') && $thesod_sidebar_position) {
echo '<div class="sidebar col-lg-3 col-md-3 col-sm-12'.esc_attr($thesod_sidebar_classes).'" role="complementary">';
get_sidebar('shop');
echo '</div><!-- .sidebar -->';
}
?>
</div>
<div class="fullwidth-block products-page-separator"><div class="sod-divider sod-divider-style-6"></div></div>
<?php get_sidebar('shop-bottom'); ?>
</div>
</div>