if (mfn_opts_get('subheader-padding')) { $subheader_style .= 'padding:' . mfn_opts_get('subheader-padding') . ';'; } if (is_search()) { // Page title ------------------------- echo '<div id="Subheader" style="' . $subheader_style . '">'; echo '<div class="container">'; echo '<div class="column one">'; global $wp_query; $total_results = $wp_query->found_posts; $translate['search-results'] = mfn_opts_get('translate') ? mfn_opts_get('translate-search-results', 'results found for:') : __('results found for:', 'betheme'); echo '<h1 class="title">' . $total_results . ' ' . $translate['search-results'] . ' ' . esc_html($_GET['s']) . '</h1>'; echo '</div>'; echo '</div>'; echo '</div>'; } elseif (!mfn_slider() || is_array($subheader_advanced) && isset($subheader_advanced['slider-show'])) { // Page title ------------------------- // Subheader | Options $subheader_options = mfn_opts_get('subheader'); if (is_home() && !get_option('page_for_posts') && !mfn_opts_get('blog-page')) { $subheader_show = false; } elseif (is_array($subheader_options) && isset($subheader_options['hide-subheader'])) { $subheader_show = false; } elseif (get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) { $subheader_show = false; } else { $subheader_show = true; } if (is_array($subheader_options) && isset($subheader_options['hide-breadcrumbs'])) { $breadcrumbs_show = false; } else {
if (mfn_header_style(true) != 'header-below') { if (is_shop() || mfn_opts_get('shop-slider') == 'all') { echo mfn_slider($shop_id); } } ?> </header> <?php add_filter('woocommerce_show_page_title', create_function(false, 'return false;')); $subheader_advanced = mfn_opts_get('subheader-advanced'); $subheader_style = ''; if (mfn_opts_get('subheader-padding')) { $subheader_style .= 'padding:' . mfn_opts_get('subheader-padding') . ';'; } if (is_product() || !mfn_slider($shop_id) || is_array($subheader_advanced) && isset($subheader_advanced['slider-show'])) { // Subheader | Options $subheader_options = mfn_opts_get('subheader'); if (is_array($subheader_options) && isset($subheader_options['hide-subheader'])) { $subheader_show = false; } elseif (get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) { $subheader_show = false; } else { $subheader_show = true; } if (is_array($subheader_options) && isset($subheader_options['hide-breadcrumbs'])) { $breadcrumbs_show = false; } else { $breadcrumbs_show = true; } // Subheader | Print
function mfn_body_classes($classes) { // Layout | Custom ------------------------------------ $layoutID = mfn_layout_ID(); // Slider --------------------------------------------- if (mfn_slider()) { $classes[] = 'template-slider'; } // Sidebar -------------------------------------------- $classes[] = mfn_sidebar_classes(); // Skin ----------------------------------------------- if ($_GET && key_exists('mfn-c', $_GET)) { $classes[] = 'color-' . $_GET['mfn-c']; // demo } elseif ($layoutID) { $classes[] = 'color-' . get_post_meta($layoutID, 'mfn-post-skin', true); } else { $classes[] = 'color-' . mfn_opts_get('skin', 'custom'); } // Style | Default & Simple --------------------------- if ($_GET && key_exists('mfn-style', $_GET)) { $classes[] = 'style-' . $_GET['mfn-style']; // demo } else { $classes[] = 'style-' . mfn_opts_get('style', 'default'); } // Layout | Full Width & Boxed ------------------------ if ($_GET && key_exists('mfn-box', $_GET)) { $classes[] = 'layout-boxed'; // demo } elseif ($layoutID) { $classes[] = 'layout-' . get_post_meta($layoutID, 'mfn-post-layout', true); } else { $classes[] = 'layout-' . mfn_opts_get('layout', 'full-width'); } // One Page ------------------------------------------- if (get_post_meta(mfn_ID(), 'mfn-post-one-page', true)) { $classes[] = 'one-page'; } // Grid 960px ----------------------------------------- if (mfn_is_960()) { $classes[] = 'grid960'; } // Nice Scroll ---------------------------------------- if (mfn_opts_get('nice-scroll')) { $classes[] = 'nice-scroll-on'; } // Responsive ----------------------------------------- if (mfn_opts_get('no-hover')) { $classes[] = 'no-hover-' . mfn_opts_get('no-hover'); } if (mfn_opts_get('no-section-bg')) { $classes[] = 'no-section-bg-' . mfn_opts_get('no-section-bg'); } if (mfn_opts_get('responsive-top-bar')) { $classes[] = 'mobile-tb-' . mfn_opts_get('responsive-top-bar'); } $responsive_options = mfn_opts_get('responsive-options'); if (is_array($responsive_options) && isset($responsive_options['mobile-wide'])) { $classes[] = 'mobile-wide'; } // Button | Style ------------------------------------- if ($_GET && key_exists('mfn-btn', $_GET)) { $classes[] = 'button-' . $_GET['mfn-btn']; // demo } elseif (mfn_opts_get('button-style')) { $classes[] = 'button-' . mfn_opts_get('button-style'); } // Image Frame | Style -------------------------------- if ($_GET && key_exists('mfn-if', $_GET)) { $classes[] = 'if-' . $_GET['mfn-if']; // demo } elseif (mfn_opts_get('image-frame-style')) { $classes[] = 'if-' . mfn_opts_get('image-frame-style'); } // Content Padding ------------------------------------ if (mfn_opts_get('content-remove-padding')) { $classes[] = 'no-content-padding'; } elseif (get_post_meta(mfn_ID(), 'mfn-post-remove-padding', true)) { $classes[] = 'no-content-padding'; } // RTL | demo only ------------------------------------ if ($_GET && key_exists('mfn-rtl', $_GET)) { $classes[] = 'rtl'; } // Love ----------------------------------------------- if (!mfn_opts_get('love')) { $classes[] = 'hide-love'; } // Table Hover ---------------------------------------- if (mfn_opts_get('table-hover-disable')) { $classes[] = 'no-table-hover'; } // Header ============================================= $header_options = mfn_opts_get('header-fw') ? mfn_opts_get('header-fw') : false; // Header | Layout -------------------------- $classes[] = mfn_header_style(); // Header | Full Width ---------------------- if ($_GET && key_exists('mfn-hfw', $_GET)) { $classes[] = 'header-fw'; // demo } elseif (isset($header_options['full-width'])) { $classes[] = 'header-fw'; } // Header | Boxed --------------------------- if (is_array($header_options) && isset($header_options['header-boxed'])) { $classes[] = 'header-boxed'; } // Header | Minimalist ---------------------- if ($_GET && key_exists('mfn-min', $_GET)) { $classes[] = 'minimalist-header'; // demo } elseif ($layoutID) { if (get_post_meta($layoutID, 'mfn-post-minimalist-header', true)) { $classes[] = 'minimalist-header'; } } elseif (mfn_opts_get('minimalist-header')) { $classes[] = 'minimalist-header'; } // Header | Sticky -------------------------- if (mfn_opts_get('sticky-header') && mfn_header_style(true) != 'header-creative') { $classes[] = 'sticky-header'; } // Header Sticky Style ---------------------- if ($_GET && key_exists('mfn-ss', $_GET)) { $classes[] = 'sticky-' . $_GET['mfn-ss']; // demo } elseif ($layoutID) { $classes[] = 'sticky-' . get_post_meta($layoutID, 'mfn-post-sticky-header-style', true); } else { $classes[] = 'sticky-' . mfn_opts_get('sticky-header-style', 'white'); } // Action Bar ------------------------------- if (mfn_opts_get('action-bar')) { $classes[] = 'ab-show'; } else { $classes[] = 'ab-hide'; } // Subheader | Transparent ------------------ $skin = mfn_opts_get('skin', 'custom'); if ($_GET && key_exists('mfn-subtr', $_GET)) { $classes[] = 'subheader-transparent'; // demo } elseif (!in_array($skin, array('custom', 'one'))) { if (mfn_opts_get('subheader-transparent') != 100) { $classes[] = 'subheader-transparent'; } } // Subheader | Style ------------------------ if ($_GET && key_exists('mfn-sh', $_GET)) { $classes[] = 'subheader-' . $_GET['mfn-sh']; // demo } else { $classes[] = 'subheader-' . mfn_opts_get('subheader-style', 'title-left'); } // Menu | Style ----------------------------- if ($_GET && key_exists('mfn-m', $_GET)) { $classes[] = 'menu-' . $_GET['mfn-m']; // demo } elseif (mfn_opts_get('menu-style')) { $classes[] = 'menu-' . mfn_opts_get('menu-style'); } // Menu | Options --------------------------- $menu_options = mfn_opts_get('menu-options'); if (is_array($menu_options) && isset($menu_options['align-right'])) { $classes[] = 'menuo-right'; } if (is_array($menu_options) && isset($menu_options['menu-arrows'])) { $classes[] = 'menuo-arrows'; } if (is_array($menu_options) && isset($menu_options['hide-borders'])) { $classes[] = 'menuo-no-borders'; } if (is_array($menu_options) && isset($menu_options['last'])) { $classes[] = 'menuo-last'; } // Footer ============================================= // Footer | Style --------------------------- if ($_GET && key_exists('mfn-ftr', $_GET)) { $classes[] = 'footer-' . $_GET['mfn-ftr']; // demo } elseif (mfn_opts_get('footer-style')) { $classes[] = 'footer-' . mfn_opts_get('footer-style'); } // Footer | Copy & Social ------------------- if (mfn_opts_get('footer-hide') == 'center') { $classes[] = 'footer-copy-center'; } return $classes; }
<?php if (mfn_opts_get('subheader') != 'all' && !get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) { if (is_search()) { // Page title ------------------------- echo '<div id="Subheader">'; echo '<div class="container">'; echo '<div class="column one">'; global $wp_query; $total_results = $wp_query->found_posts; $translate['search-results'] = mfn_opts_get('translate') ? mfn_opts_get('translate-search-results', 'results found for:') : __('results found for:', 'betheme'); echo '<h1 class="title">' . $total_results . ' ' . $translate['search-results'] . ' ' . get_search_query() . '</h1>'; echo '</div>'; echo '</div>'; echo '</div>'; } elseif (!mfn_slider() || mfn_opts_get('subheader-slider-show')) { // Page title ------------------------- // Subheader | Options $subheader_options = mfn_opts_get('subheader'); if (is_array($subheader_options) && isset($subheader_options['hide-subheader'])) { $subheader_show = false; } elseif (get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) { $subheader_show = false; } else { $subheader_show = true; } if (is_array($subheader_options) && isset($subheader_options['hide-breadcrumbs'])) { $breadcrumbs_show = false; } else { $breadcrumbs_show = true; }
function mfn_body_classes($classes) { // custom layout ------------------ $layoutID = get_post_meta(mfn_ID(), 'mfn-post-custom-layout', true); // template-slider ---------------- if (mfn_slider()) { $classes[] = 'template-slider'; } // sidebar classes ---------------- $classes[] = mfn_sidebar_classes(); // skin --------------------------- if ($_GET && key_exists('mfn-c', $_GET)) { $classes[] = 'color-' . $_GET['mfn-c']; // demo } elseif ($layoutID) { $classes[] = 'color-' . get_post_meta($layoutID, 'mfn-post-skin', true); } else { $classes[] = 'color-' . mfn_opts_get('skin', 'custom'); } // theme layout ------------------- if ($_GET && key_exists('mfn-box', $_GET)) { $classes[] = 'layout-boxed'; // demo } elseif ($layoutID) { $classes[] = 'layout-' . get_post_meta($layoutID, 'mfn-post-layout', true); } else { $classes[] = 'layout-' . mfn_opts_get('layout', 'full-width'); } // header layout ------------------ $classes[] = mfn_header_style(); // minimalist header -------------- if ($_GET && key_exists('mfn-min', $_GET)) { $classes[] = 'minimalist-header'; // demo } elseif ($layoutID) { if (get_post_meta($layoutID, 'mfn-post-minimalist-header', true)) { $classes[] = 'minimalist-header'; } } elseif (mfn_opts_get('minimalist-header')) { $classes[] = 'minimalist-header'; } // subheader-transparent ---------- if ($_GET && key_exists('mfn-subtr', $_GET)) { $classes[] = 'subheader-transparent'; // demo } elseif (mfn_opts_get('subheader-transparent')) { $classes[] = 'subheader-transparent'; } // subheader-transparent ---------- if ($_GET && key_exists('mfn-mr', $_GET)) { $classes[] = 'header-menu-right'; // demo } elseif (mfn_opts_get('header-menu-right')) { $classes[] = 'header-menu-right'; } // menu-style --------------------- if ($_GET && key_exists('mfn-m', $_GET)) { $classes[] = 'menu-' . $_GET['mfn-m']; // demo } elseif (mfn_opts_get('menu-style')) { $classes[] = 'menu-' . mfn_opts_get('menu-style'); } // grid 960px --------------------- if (mfn_is_960()) { $classes[] = 'grid960'; } // sticky header ------------------ if (mfn_opts_get('sticky-header') && mfn_header_style(true) != 'header-creative') { $classes[] = 'sticky-header'; } // nice scroll -------------------- if (mfn_opts_get('nice-scroll')) { $classes[] = 'nice-scroll-on'; } // page title --------------------- if ($_GET && key_exists('mfn-hide', $_GET)) { $classes[] = 'hide-title-area'; // demo } elseif (get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) { $classes[] = 'hide-title-area'; } // rtl | demo --------------------- if ($_GET && key_exists('mfn-rtl', $_GET)) { $classes[] = 'rtl'; } return $classes; }
get_template_part('includes/header', 'top-area'); } ?> <?php if (mfn_header_style(true) != 'header-below') { if (is_shop() || mfn_opts_get('shop-slider') == 'all') { echo mfn_slider($shop_id); } } ?> </header> <?php add_filter('woocommerce_show_page_title', create_function(false, 'return false;')); if (is_product() || !mfn_slider($shop_id) || mfn_opts_get('subheader-slider-show')) { // Subheader | Options $subheader_options = mfn_opts_get('subheader'); if (is_array($subheader_options) && isset($subheader_options['hide-subheader'])) { $subheader_show = false; } elseif (get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) { $subheader_show = false; } else { $subheader_show = true; } if (is_array($subheader_options) && isset($subheader_options['hide-breadcrumbs'])) { $breadcrumbs_show = false; } else { $breadcrumbs_show = true; } // Subheader | Print
?> </header> <?php if (is_search()) { // Page title ------------------------- echo '<div id="Subheader">'; echo '<div class="container">'; echo '<div class="column one">'; global $wp_query; $total_results = $wp_query->found_posts; echo '<h1 class="title">' . $total_results . ' ' . __('results found for:', 'betheme') . ' ' . get_search_query() . '</h1>'; echo '</div>'; echo '</div>'; echo '</div>'; } elseif (!is_front_page() && !mfn_slider()) { // Page title ------------------------- echo '<div id="Subheader">'; echo '<div class="container">'; echo '<div class="column one">'; // Title echo '<h1 class="title">' . mfn_page_title() . '</h1>'; // Breadcrumbs if (mfn_opts_get('show-breadcrumbs')) { mfn_breadcrumbs(); } echo '</div>'; echo '</div>'; echo '</div>'; } ?>
} ?> <?php if (mfn_header_style(true) != 'header-below') { if (is_shop() || mfn_opts_get('shop-slider') == 'all') { echo mfn_slider($shop_id); } } ?> </header> <?php add_filter('woocommerce_show_page_title', create_function(false, 'return false;')); if (mfn_opts_get('subheader') != 'all' && !get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) { if (is_product() || !mfn_slider($shop_id)) { echo '<div id="Subheader">'; echo '<div class="container">'; echo '<div class="column one">'; // Title $h = is_product() ? 2 : 1; // h1 - shop, h2 - single product echo '<h' . $h . ' class="title">'; woocommerce_page_title(); echo '</h' . $h . '>'; // Breadcrumbs if (!mfn_opts_get('subheader')) { $home = mfn_opts_get('translate') ? mfn_opts_get('translate-home', 'Home') : __('Home', 'betheme'); $woo_crumbs_args = apply_filters('woocommerce_breadcrumb_defaults', array('delimiter' => false, 'wrap_before' => '<ul class="breadcrumbs woocommerce-breadcrumb">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '<span><i class="icon-right-open"></i></span></li>', 'home' => $home)); woocommerce_breadcrumb($woo_crumbs_args); }