-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
82 lines (56 loc) · 2.19 KB
/
Copy pathsidebar.php
File metadata and controls
82 lines (56 loc) · 2.19 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
<?php
/**
* The sidebar containing the sidebar 2.
*
*/
global $wp_registered_sidebars;
$no_widget_title = __('No Widget Found', 'howes');
$no_widget_desc_text = __( 'We don\'t find any widget to show. Please add some widgets by going to <strong>Admin > Appearance > Widgets</strong> and add widgets in <strong>"%s"</strong> area.', 'howes' );
?>
<?php
if( is_page() ){
?>
<?php
$sidebar2 = 'sidebar-right-page';
$sidebar2_page = get_post_meta($post->ID,'_thememount_page_options_rightsidebar',true);
if( trim($sidebar2_page)!='' ){ $sidebar2 = trim($sidebar2_page); }
// Language translation
$no_widget_desc = sprintf( $no_widget_desc_text, $wp_registered_sidebars[$sidebar2]['name'] );
?>
<aside id="sidebar-right" class="widget-area col-md-3 col-lg-3 col-sm-4 col-xs-12 sidebar" role="complementary">
<?php if ( ! dynamic_sidebar( $sidebar2 ) ) : ?>
<div class="thememount-centertext">
<h3><?php echo $no_widget_title; ?></h3>
<br />
<p><?php echo $no_widget_desc; ?></p>
</div>
<?php endif; // end sidebar widget area ?>
</aside><!-- #sidebar-right -->
<?php
} elseif( is_search() ) {
$no_widget_desc = sprintf( $no_widget_desc_text, $wp_registered_sidebars['sidebar-right-search']['name'] );
?>
<aside id="sidebar-right" class="widget-area col-md-3 col-lg-3 col-sm-4 col-xs-12 sidebar" role="complementary">
<?php if ( ! dynamic_sidebar( 'sidebar-right-search' ) ) : ?>
<div class="thememount-centertext">
<h3><?php echo $no_widget_title; ?></h3>
<br />
<p><?php echo $no_widget_desc; ?></p>
</div>
<?php endif; // end sidebar widget area ?>
</aside><!-- #sidebar-right -->
<?php
} else {
$no_widget_desc = sprintf( $no_widget_desc_text, $wp_registered_sidebars['sidebar-right-blog']['name'] );
?>
<aside id="sidebar-right" class="widget-area col-md-3 col-lg-3 col-sm-4 col-xs-12 sidebar" role="complementary">
<?php if ( ! dynamic_sidebar( 'sidebar-right-blog' ) ) : ?>
<div class="thememount-centertext">
<h3><?php echo $no_widget_title; ?></h3>
<br />
<p><?php echo $no_widget_desc; ?></p>
</div>
<?php endif; // end sidebar widget area ?>
</aside><!-- #sidebar-right -->
<?php
}