function zn_sensei_before_main_content() { $args = array(); if (!is_single()) { // SHOW THE HEADER if (empty($args['title'])) { //** Put the header with title and breadcrumb $args['title'] = __('Courses', 'zn_framework'); } if (is_tax()) { $args['title'] = get_the_archive_title(); $args['subtitle'] = ''; // Reset the subtitle for categories and tags } } WpkPageHelper::zn_get_subheader($args); global $zn_config; $zn_config['force_sidebar'] = 'blog_sidebar'; $main_class = zn_get_sidebar_class('blog_sidebar'); if (strpos($main_class, 'right_sidebar') !== false || strpos($main_class, 'left_sidebar') !== false) { $zn_config['sidebar'] = true; } else { $zn_config['sidebar'] = false; } $zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12'; ?> <section id="content" class="site-content shop_page"> <div class="container"> <div class="row"> <div class="<?php echo $main_class; ?> "> <?php }
<?php if (!defined('ABSPATH')) { return; } /** * Template layout for single entries * @package Kallyas * @author Team Hogash */ get_header(); /*** USE THE NEW HEADER FUNCTION **/ WpkPageHelper::zn_get_subheader(); // Check to see if the page has a sidebar or not $main_class = zn_get_sidebar_class('single_sidebar'); if (strpos($main_class, 'right_sidebar') !== false || strpos($main_class, 'left_sidebar') !== false) { $zn_config['sidebar'] = true; } else { $zn_config['sidebar'] = false; } $zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12'; ?> <section id="content" class="site-content" > <div class="container"> <div class="row"> <!--// Main Content: page content from WP_EDITOR along with the appropriate sidebar if one specified. --> <div class="<?php echo $main_class; ?>
global $zn_config; // Check to see on what type of page we are on $layout = 'blog_sidebar'; if (!empty($zn_config['force_sidebar'])) { $layout = $zn_config['force_sidebar']; } else { if (is_page() || is_404() || is_attachment()) { $layout = 'page_sidebar'; } elseif (is_archive()) { $layout = 'archive_sidebar'; } elseif (is_singular()) { $layout = 'single_sidebar'; } } // Get the sidebar position $sidebar_pos = zn_get_sidebar_class($layout); $has_sidebar = false; if (strpos($sidebar_pos, 'left_sidebar') !== false) { $has_sidebar = true; } if (strpos($sidebar_pos, 'right_sidebar') !== false) { $has_sidebar = true; } // Return if we do not have a sidebar if (!$has_sidebar) { return; } // Show the sidebar already :) echo '<aside class="col-md-3">'; echo '<div class="zn_sidebar sidebar kl-sidebar--' . zget_option('zn_main_style', 'color_options', false, 'light') . '">'; // Check to see if this is a page and has a custom sidebar
function zn_woocommerce_before_main_content() { $args = array(); if (!is_single()) { // SHOW THE HEADER $args['title'] = zget_option('woo_arch_page_title', 'zn_woocommerce_options'); $args['subtitle'] = zget_option('woo_arch_page_subtitle', 'zn_woocommerce_options'); if (empty($args['title'])) { //** Put the header with title and breadcrumb $args['title'] = __('Shop', 'zn_framework'); } if (is_shop()) { $headerClass = zget_option('woo_sub_header', 'zn_woocommerce_options', false, 'zn_def_header_style'); if ($headerClass != 'zn_def_header_style') { $headerClass = 'uh_' . $headerClass; } $args['headerClass'] = $headerClass; } if (is_product_category() || is_product_tag()) { global $wp_query; $tax = $wp_query->get_queried_object(); $args['title'] = $tax->name; $args['subtitle'] = ''; // Reset the subtitle for categories and tags } } WpkPageHelper::zn_get_subheader($args); // Check to see if the page has a sidebar or not global $zn_config; $sidebar_pos = false; if (is_single()) { $layout = 'woo_single_sidebar'; } elseif (is_shop()) { $sidebar_pos = get_post_meta(get_option('woocommerce_shop_page_id'), 'zn_page_layout', true); $zn_config['forced_sidebar_id'] = get_post_meta(get_option('woocommerce_shop_page_id'), 'zn_sidebar_select', true); $layout = 'woo_archive_sidebar'; } elseif (is_archive()) { $layout = 'woo_archive_sidebar'; } $zn_config['force_sidebar'] = $layout; $main_class = zn_get_sidebar_class($layout, $sidebar_pos); if (strpos($main_class, 'right_sidebar') !== false || strpos($main_class, 'left_sidebar') !== false) { $zn_config['sidebar'] = true; } else { $zn_config['sidebar'] = false; } $zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12'; global $post; ?> <section id="content" class="site-content shop_page"> <div class="container"> <div class="row"> <div class="<?php echo $main_class; ?> "> <?php }
wp_enqueue_style('search-css', THEME_BASE_URI . '/css/pages/search.css', array('kallyas-styles'), ZN_FW_VERSION); get_header(); /*** USE THE NEW HEADER FUNCTION **/ global $wp_query; if (!empty($wp_query->found_posts)) { $title = $wp_query->found_posts . " " . __('search results for:', 'zn_framework') . " " . esc_attr(get_search_query()); } else { if (!empty($_GET['s'])) { $title = __('Search results for:', 'zn_framework') . " " . esc_attr(get_search_query()); } else { $title = __('To search the site please enter a valid term', 'zn_framework'); } } WpkPageHelper::zn_get_subheader(array('title' => $title)); // Check to see if the page has a sidebar or not $main_class = zn_get_sidebar_class('blog_sidebar'); if (strpos($main_class, 'right_sidebar') !== false || strpos($main_class, 'left_sidebar') !== false) { $zn_config['sidebar'] = true; } else { $zn_config['sidebar'] = false; } $zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12'; ?> <section id="content" class="site-content"> <div class="container kl-searchpage"> <div class="row"> <div class="col-sm-12"> <div class="search-form-wrapper u-mb-30"> <?php get_search_form(true);
<?php if (!defined('ABSPATH')) { return; } /** * This is the template layout for pages. * * @package Kallyas * @author Team Hogash */ get_header(); WpkPageHelper::zn_get_subheader(); // Check to see if the page has a sidebar or not $main_class = zn_get_sidebar_class('page_sidebar'); if (strpos($main_class, 'right_sidebar') !== false || strpos($main_class, 'left_sidebar') !== false) { $zn_config['sidebar'] = true; } else { $zn_config['sidebar'] = false; } $zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12'; ?> <!--// Main Content: page content from WP_EDITOR along with the appropriate sidebar if one specified. --> <section id="content" class="site-content" > <div class="container"> <div class="row"> <div class="<?php echo $main_class; ?> ">
if (!defined('ABSPATH')) { return; } /** * Template layout for ARCHIVES * @package Kallyas * @author Team Hogash */ get_header(); /*** USE THE NEW HEADER FUNCTION **/ //** Put the header with title and breadcrumb $title = zn_archive_title(); WpkPageHelper::zn_get_subheader(array('title' => $title)); // Check to see if the page has a sidebar or not $main_class = zn_get_sidebar_class('archive_sidebar'); if (strpos($main_class, 'right_sidebar') !== false || strpos($main_class, 'left_sidebar') !== false) { $zn_config['sidebar'] = true; } else { $zn_config['sidebar'] = false; } $zn_config['size'] = $zn_config['sidebar'] ? 'col-sm-9' : 'col-sm-12'; ?> <section id="content" class="site-content" > <div class="container"> <div class="row"> <div id="th-content-archive" class="<?php echo $main_class; ?> ">