display); } function kadence_sidebar_on_shop_page() { global $virtue; if(isset($virtue['shop_layout']) && $virtue['shop_layout'] == 'sidebar') { if( is_shop() || is_product_category() || is_product_tag()) { return false; } } else { if( is_shop() || is_product_category() || is_product_tag()) { return true; } } } function kadence_sidebar_on_blog_post() { if(is_single()) { global $post; $postsidebar = get_post_meta( $post->ID, '_kad_post_sidebar', true ); if(isset($postsidebar) && $postsidebar == 'no') { return true; } else { return false; } } } function kadence_sidebar_on_home_page() { if(is_front_page()) { global $virtue; if(isset($virtue['home_sidebar_layout']) && $virtue['home_sidebar_layout'] == 'sidebar') { return false; } else { return true; } } } function kadence_sidebar_on_blog_page() { if(is_page_template('page-blog.php')) { global $post; $pagesidebar = get_post_meta( $post->ID, '_kad_page_sidebar', true ); if(isset($pagesidebar) && $pagesidebar == 'no') { return true; } else { return false; } } } function kadence_sidebar_on_myaccount_page() { if(is_account_page()) { if(kad_is_wc_version_gte_2_6() == 1) { return true; } else { $current_user = wp_get_current_user(); if ( 0 == $current_user->ID ) { return true; } else { return false; } } } } function kadence_display_topbar() { global $virtue; if(isset($virtue['topbar'])) { if($virtue['topbar'] == 1 ) {$topbar = true;} else { $topbar = false;} } else {$topbar = true;} return $topbar; } function kadence_display_topbar_icons() { global $virtue; if(isset($virtue['topbar_icons'])) { if($virtue['topbar_icons'] == 1 ) {$topbaricons = true;} else { $topbaricons = false;} } else {$topbaricons = false;} return $topbaricons; } function kadence_display_top_search() { global $virtue; if(isset($virtue['topbar_search'])) { if($virtue['topbar_search'] == 1 ) {$topsearch = true;} else { $topsearch = false;} } else {$topsearch = true;} return $topsearch; } function kadence_display_topbar_widget() { global $virtue; if(isset($virtue['topbar_widget'])) { if($virtue['topbar_widget'] == 1 ) {$topbarwidget = true;} else { $topbarwidget = false;} } else {$topbarwidget = false;} return $topbarwidget; } // Add body class for wide or boxed layout add_filter('body_class','kadence_layout_class_names'); function kadence_layout_class_names($classes) { global $virtue; // add 'class-name' to the $classes array if(isset($virtue['boxed_layout'])) { $layoutstyle = $virtue['boxed_layout']; } else { $layoutstyle = 'wide'; } if ($layoutstyle == "boxed") { $classes[] = 'boxed'; } else { $classes[] = 'wide'; } // return the $classes array return $classes; } if (!isset($content_width)) { $content_width = 1140; }