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 }
/** * This method is used to display the output of the element. * @return void */ function element() { $bgsource = array('source_type' => $this->opt('source_type'), 'source_background_image' => $this->opt('source_background_image'), 'source_vd_yt' => $this->opt('source_vd_yt'), 'source_vd_self_mp4' => $this->opt('source_vd_self_mp4'), 'source_vd_self_ogg' => $this->opt('source_vd_self_ogg'), 'source_vd_self_webm' => $this->opt('source_vd_self_webm'), 'source_vd_vp' => $this->opt('source_vd_vp'), 'source_vd_autoplay' => $this->opt('source_vd_autoplay'), 'source_vd_loop' => $this->opt('source_vd_loop'), 'source_vd_muted' => $this->opt('source_vd_muted'), 'source_vd_controls' => $this->opt('source_vd_controls'), 'source_vd_controls_pos' => $this->opt('source_vd_controls_pos'), 'source_overlay' => $this->opt('source_overlay'), 'source_overlay_color' => $this->opt('source_overlay_color'), 'source_overlay_opacity' => $this->opt('source_overlay_opacity'), 'source_overlay_color_gradient' => $this->opt('source_overlay_color_gradient'), 'source_overlay_color_gradient_opac' => $this->opt('source_overlay_color_gradient_opac')); $config = array('headerClass' => 'site-subheader-cst uh_' . $this->opt('hm_header_style', 'zn_def_header_style'), 'def_header_date' => $this->opt('hm_header_date', 1), 'extra_css_class' => $this->data['uid'] . ' ' . $this->opt('css_class', ''), 'bottommask' => $this->opt('hm_header_bmasks', 'none'), 'bg_source' => $bgsource, 'def_header_title' => $this->opt('hm_header_title', 1), 'show_subtitle' => $this->opt('hm_header_subtitle', 1), 'def_header_bread' => $this->opt('hm_header_bread', 1), 'is_element' => true, 'inherit_head_pad' => $this->opt('hm_inherit_ulm', 'no') == 'yes' ? true : false); $title = $this->opt('hm_header_ovtitle'); $subtitle = $this->opt('hm_header_ovsubtitle'); if (!empty($title)) { $config['title'] = $title; } if (!empty($subtitle)) { $config['subtitle'] = $subtitle; } // display the Subheader WpkPageHelper::zn_get_subheader($config); }
<?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; ?>
<?php wp_enqueue_style('page404-css', THEME_BASE_URI . '/css/pages/page404.css', array('kallyas-styles'), ZN_FW_VERSION); get_header(); $headerClass = zget_option('404_header_style', 'zn_404_options', false, 'zn_def_header_style'); if ($headerClass != 'zn_def_header_style') { $headerClass = 'uh_' . $headerClass; } WpkPageHelper::zn_get_subheader(array('headerClass' => $headerClass, 'def_header_bread' => false, 'def_header_date' => false, 'def_header_title' => false)); ?> <div class="error404-page"> <section id="content" class="site-content" > <div class="container"> <div id="mainbody"> <div class="row"> <div class="col-sm-12"> <div class="error404-content"> <h2 class="error404-content-title"><span>404</span></h2> <h3 class="error404-content-msg"><?php echo __("The page cannot be found.", 'zn_framework'); ?> </h3> </div> </div> <div class="col-sm-12">
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 }
* @author Team Hogash */ 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">