-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsidebar-left.php
44 lines (41 loc) · 1.71 KB
/
sidebar-left.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 area.
*
* @package ThemeGrill
* @subpackage ColorNews
* @since ColorNews 1.0
*/
?>
<div id="secondary">
<?php do_action( 'colornews_before_sidebar' ); ?>
<?php
if( is_page_template( 'page-templates/contact.php' ) ) {
$sidebar = 'colornews_contact_page_sidebar';
}
else {
$sidebar = 'colornews_left_sidebar';
}
?>
<?php if ( ! dynamic_sidebar( $sidebar ) ) :
if ( $sidebar == 'colornews_contact_page_sidebar' ) {
$sidebar_display = __('Contact Page', 'colornews');
} else {
$sidebar_display = __('Left', 'colornews');
}
the_widget( 'WP_Widget_Text',
array(
'title' => __( 'Example Widget', 'colornews' ),
'text' => sprintf( __( 'This is an example widget to show how the %s Sidebar looks by default. You can add custom widgets from the %swidgets screen%s in the admin. If custom widgets is added than this will be replaced by those widgets.', 'colornews' ), $sidebar_display, current_user_can( 'edit_theme_options' ) ? '<a href="' . admin_url( 'widgets.php' ) . '">' : '', current_user_can( 'edit_theme_options' ) ? '</a>' : '' ),
'filter' => true,
),
array(
'before_widget' => '<aside class="widget widget_text clearfix">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title title-block-wrap clearfix"><span class="block-title"><span>',
'after_title' => '</span></span></h3>'
)
);
endif; ?>
<?php do_action( 'colornews_after_sidebar' ); ?>
</div>