-
Notifications
You must be signed in to change notification settings - Fork 6
/
sidebar.php
29 lines (27 loc) · 943 Bytes
/
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
<?php //if( _hui('layout') == '1' ) return; ?>
<div class="sidebar">
<?php
$post_template =get_post_meta( get_the_ID(), '_post_template', true );
if (function_exists('dynamic_sidebar')){
dynamic_sidebar('header');
if (is_home()){
dynamic_sidebar('home');
}else if (is_single()){
if (strpos($post_template,'video') !== false){
dynamic_sidebar('single_video');
}elseif (strpos($post_template,'product') !== false){
dynamic_sidebar('single_product');
}else{
dynamic_sidebar('single');
}
}elseif (is_category()){
dynamic_sidebar('category');
}else if (is_tag() ){
dynamic_sidebar('tag');
}else if (is_search()){
dynamic_sidebar('search');
}
dynamic_sidebar('footer');
}
?>
</div>