Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Dual sidebars? Get sidebar-2 template
- /* ------------------------------------ */
- if ( ! function_exists( 'alx_sidebar_dual' ) ) {
- function alx_sidebar_dual() {
- global $post;
- if (
- ( is_home() && (
- ( ot_get_option('layout-home') =='col-3cm' ) ||
- ( ot_get_option('layout-home') =='col-3cl' ) ||
- ( ot_get_option('layout-home') =='col-3cr' ) )
- ) ||
- ( is_single() && (
- ( ot_get_option('layout-single') =='col-3cm' ) ||
- ( ot_get_option('layout-single') =='col-3cl' ) ||
- ( ot_get_option('layout-single') =='col-3cr' ) )
- ) ||
- ( is_archive() && (
- ( ot_get_option('layout-archive') =='col-3cm' ) ||
- ( ot_get_option('layout-archive') =='col-3cl' ) ||
- ( ot_get_option('layout-archive') =='col-3cr' ) )
- ) ||
- ( is_category() && (
- ( ot_get_option('layout-archive-category') =='col-3cm' ) ||
- ( ot_get_option('layout-archive-category') =='col-3cl' ) ||
- ( ot_get_option('layout-archive-category') =='col-3cr' ) )
- ) ||
- ( is_search() && (
- ( ot_get_option('layout-search') =='col-3cm' ) ||
- ( ot_get_option('layout-search') =='col-3cl' ) ||
- ( ot_get_option('layout-search') =='col-3cr' ) )
- ) ||
- ( is_404() && (
- ( ot_get_option('layout-404') =='col-3cm' ) ||
- ( ot_get_option('layout-404') =='col-3cl' ) ||
- ( ot_get_option('layout-404') =='col-3cr' ) )
- ) ||
- ( is_page() && (
- ( ot_get_option('layout-page') =='col-3cm' ) ||
- ( ot_get_option('layout-page') =='col-3cl' ) ||
- ( ot_get_option('layout-page') =='col-3cr' ) )
- )
- )
- { get_template_part('sidebar-2'); }
- elseif (
- ( is_page() || is_single() ) && (
- ( get_post_meta($post->ID,'_layout',true) == 'col-3cm' ) ||
- ( get_post_meta($post->ID,'_layout',true) == 'col-3cl' ) ||
- ( get_post_meta($post->ID,'_layout',true) == 'col-3cr' ) )
- )
- { get_template_part('sidebar-2'); }
- elseif (
- ( ot_get_option('layout-global') =='col-3cm' ) ||
- ( ot_get_option('layout-global') =='col-3cl' ) ||
- ( ot_get_option('layout-global') =='col-3cr' )
- )
- { get_template_part('sidebar-2'); }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement