-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.php
44 lines (37 loc) · 1.39 KB
/
sidebar.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
<?php
/**
* The Sidebar containing the main widget areas.
*
* @package Bad Weather
*/
?>
<?php if( Bw::get_meta('page_layout') == 'right'
or is_search()
or is_category()
or basename( @get_page_template() ) == 'custom-page-builder.php'
or ( get_post_type() == 'post' && Bw::get_meta('page_layout') !== 'full' )
or ( Bw_woo::woo_active_plugin() and is_shop() and Bw_woo::post_meta_shop( 'page_layout' ) == 'right' )
or ( Bw_woo::woo_active_plugin() and is_product_category() and Bw_woo::post_meta_shop( 'page_layout' ) == 'right' ) ) : ?>
<div id="sidebar" class="<?php echo (basename( get_page_template() ) == 'custom-page-builder.php') ? 'custom' : ''; ?>">
<?php $sidebar = Bw_woo::is_woo() ? 'sidebar-shop' : 'sidebar-1'; ?>
<?php if ( ! dynamic_sidebar( $sidebar ) ) : ?>
<aside id="search" class="widget widget_search">
<?php get_search_form(); ?>
</aside>
<aside id="archives" class="widget">
<h1 class="widget-title"><?php _e( 'Archives', BW_THEME ); ?></h1>
<ul>
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
</ul>
</aside>
<aside id="meta" class="widget">
<h1 class="widget-title"><?php _e( 'Meta', BW_THEME ); ?></h1>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</aside>
<?php endif; ?>
</div> <!-- #sidebar -->
<?php endif; ?>