forked from bestwebsoft/travel-stories-wordpress-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
24 lines (24 loc) · 739 Bytes
/
sidebar.php
File metadata and controls
24 lines (24 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php /**
* The sidebar containing the main widget area
*
* Displays on posts and pages.
*
* If no active widgets are in this sidebar, hide it completely.
*
* @subpackage Travel Stories
* @since Travel Stories 1.0
*/
if ( is_active_sidebar( 'content_sidebar' ) ) {
dynamic_sidebar( 'content_sidebar' );
} else { /*If sidebar no active display next widget */
$args = array(
'before_widget' => '<div class="widget %s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="Widget_title">',
'after_title' => '</h2>',
);
$instance = array();
the_widget( 'WP_Widget_Meta', $instance, $args );
the_widget( 'WP_Widget_Calendar', $instance, $args );
the_widget( 'WP_Widget_Search', $instance, $args );
}