function cpotheme_page_title() { global $post; if (isset($post->ID)) { $current_id = $post->ID; } else { $current_id = false; } $title_tag = function_exists('is_woocommerce') && is_woocommerce() && is_singular('product') ? 'span' : 'h1'; echo '<' . $title_tag . ' class="pagetitle-title heading">'; if (function_exists('is_woocommerce') && is_woocommerce()) { woocommerce_page_title(); } elseif (is_category() || is_tag() || is_tax()) { echo single_tag_title('', true); } elseif (is_author()) { the_author(); } elseif (is_date()) { _e('Archive', 'brilliance'); } elseif (is_404()) { echo __('Page Not Found', 'brilliance'); } elseif (is_search()) { echo __('Search Results for', 'brilliance') . ' "' . get_search_query() . '"'; } else { echo get_the_title($current_id); } echo '</' . $title_tag . '>'; }
/** * Output the WooCommerce page titles to custom location. */ function ultra_display_woocommerce_page_title() { if (is_singular('product')) { woocommerce_template_single_title(); } else { echo '<h1 class="entry-title">'; woocommerce_page_title(); echo '</h1>'; } }
function square_theme_wrapper_start() { echo '<header class="sq-main-header">'; echo '<div class="sq-container">'; echo '<h1 class="sq-main-title">'; woocommerce_page_title(); echo '</h1>'; do_action('sq_woocommerce_archive_description'); echo '</div>'; echo '</header>'; echo '<div class="sq-container">'; echo '<div id="primary">'; }
function tokopress_shop_description() { $output = ''; ob_start(); if (of_get_option('tokopress_wc_hide_products_header')) { echo '<h1 class="page-title">'; woocommerce_page_title(); echo '</h1>'; } do_action('woocommerce_archive_description'); $output .= ob_get_clean(); if ($output) { echo '<div class="shop_description">' . $output . '</div>'; } }
public function get_title() { $separator = $this->title_separator; $use_wp_title = $this->use_wp_title_function; // Disabling 'title-tag' feature. $activate_title_tag_back = false; if ($use_wp_title && get_theme_support('title-tag')) { remove_theme_support('title-tag'); $activate_title_tag_back = true; } $q = $GLOBALS['wp_query']; if ($q->get('wc_query') && function_exists('woocommerce_page_title')) { if ($separator) { $separator = ''; } $title = woocommerce_page_title(false); } else { $is_home = is_home(); $is_front_page = is_front_page(); if ($is_home || $is_front_page) { if ($is_home && $is_front_page) { $title = get_bloginfo('name'); } elseif ($is_home) { $title = get_the_title(get_option('page_for_posts')); } elseif ($is_front_page) { $title = get_the_title(get_option('page_on_front')); } } else { if ($use_wp_title) { $title = wp_title($separator, false); } else { $title = is_singular() ? get_the_title(get_queried_object()) : strip_tags(get_the_archive_title()); } } } // Restoring 'title-tag' feature. if ($activate_title_tag_back) { // add_theme_support( 'title-tag' ); $GLOBALS['_wp_theme_features']['title-tag'] = true; } if ($title) { if ($separator) { $title = substr($title, strlen($separator) + 1); } $title = trim($title); } return $title; }
function store_single_custom_header() { if (apply_filters('woocommerce_show_page_title', true)) { ?> <div class="header-title col-md-12"> <span><?php woocommerce_page_title(); ?> </span> </div> <?php } ?> <div id="primary-mono" class="content-area <?php do_action('store_primary-width'); ?> "> <main id="main" class="site-main" role="main"> <?php }
function anaglyph_woo_page_title() { global $anaglyph_config; if (apply_filters('woocommerce_show_page_title', true)) { ?> <!-- Page Title --> <section id="page-title"> <div class="title"> <?php if (is_single()) { ?> <h1 class="reset-margin"><?php the_title(); ?> </h1> <?php } else { ?> <h1 class="reset-margin"><?php woocommerce_page_title(); ?> </h1> <?php } ?> </div> <?php if (!empty($anaglyph_config['shopheader-image'])) { $simg = $anaglyph_config['shopheader-image']; echo '<img src="' . esc_url($simg['url']) . '" class="parallax-bg" alt="">'; } ?> </section> <!-- end Page Title --> <?php } }
function dazzling_wrapper_start() { echo '<div class="header-title" style="padding-top: 10px; padding-bottom: 10px;">'; echo '<div class="container">'; echo '<div id="primary" class="content-area col-sm-12 col-md-6">'; echo '<h1 class="entry-title" style="display: inline-block">'; global $current_user; $user_roles = $current_user->roles; $user_role = array_shift($user_roles); if(is_product()){ the_title(); if($user_role=="wholesale_customer"){ echo " ".get_post_meta( get_the_ID(), 'pharmacies_slug', true ); } } else if(is_shop()){ if($user_role=="wholesale_customer"){ echo "Pharmacy "; } woocommerce_page_title(); } else{ woocommerce_page_title(); } echo '</h1>'; if(is_shop()){ if($user_role=="wholesale_customer"){ echo '<img style="float: right;" src="'.get_home_url().'/resources/uploads/2015/08/freeshipping_new_pharmacy.png"/>'; } else{ echo '<img style="float: right;" src="'.get_home_url().'/resources/uploads/2015/08/freeshipping_new.png"/>'; } } echo '</div>'; echo '<div id="primary" class="content-area col-sm-12 col-md-6">'; if(is_shop()){ $taxonomy = 'product_cat'; $orderby = 'name'; $show_count = 0; // 1 for yes, 0 for no $pad_counts = 0; // 1 for yes, 0 for no $hierarchical = 1; // 1 for yes, 0 for no $title = ''; $empty = 0; $args = array( 'taxonomy' => $taxonomy, 'orderby' => $orderby, 'show_count' => $show_count, 'pad_counts' => $pad_counts, 'hierarchical' => $hierarchical, 'title_li' => $title, 'hide_empty' => $empty ); echo "<span class='cat_nav'>"; $all_categories = get_categories( $args ); //print_r($all_categories); $x=1; foreach ($all_categories as $cat) { if($x ==1 ){ if($cat->category_parent == 0) { echo "<a href='#products_categories_row_$cat->term_id'>".$cat->name."</a>"; } } else{ if($cat->category_parent == 0) { echo " | <a href='#products_categories_row_$cat->term_id'>".$cat->name."</a>"; } } $x++; } echo "</span>"; } else{ echo '<img src="http://174.121.78.227/~kmxmarketing/resources/uploads/2015/08/freeshipping_new.png"/>'; } echo '</div></div></div>'; echo '<div class="site-content container">'; echo '<div id="primary" class="content-area col-sm-12 col-md-12">'; echo '<main id="main" class="site-main" role="main">'; }
/** * Wrap for woocommerce_page_title( false ). * * @param string $title * @return string */ function dt_woocommerce_get_page_title($title = '') { return woocommerce_page_title(false); }
<?php while (have_posts()) { the_post(); wc_get_template_part('content', 'product'); } ?> <?php $next_link = get_next_posts_link(__('More', 'woocommerce'), ''); echo str_replace('<a ', '<a data-rel="post-list" ' . implode(' ', $attr) . ' class="button-more ' . esc_attr($load_more_class) . '" ', $next_link); ?> <?php } else { $current_page_title = woocommerce_page_title(false); get_header('shop'); list($has_sidebar, $sidebar_position, $sidebar_area) = xt_setup_dynamic_sidebar($shop_page_id); ?> <div class="row in-container"> <!-- Main Content --> <div class="small-12 medium-<?php echo $has_sidebar ? '6' : '12'; ?> large-<?php echo $has_sidebar ? '8' : '12'; ?> column">
* @version 2.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly global $smof_data; get_header($smof_data['ts_header_layout']); $extra_class = ""; $page_column_class = ts_page_layout_columns_class($smof_data['ts_prod_cat_layout']); $show_breadcrumb = get_post_meta(wc_get_page_id('shop'), 'ts_show_breadcrumb', true); $show_page_title = apply_filters('woocommerce_show_page_title', true) && get_post_meta(wc_get_page_id('shop'), 'ts_show_page_title', true); if ($show_breadcrumb && isset($smof_data['ts_breadcrumb_layout'])) { $extra_class = 'show_breadcrumb_' . $smof_data['ts_breadcrumb_layout']; } ts_breadcrumbs_title($show_breadcrumb, $show_page_title, woocommerce_page_title(false)); $show_top_content_widget_area = is_active_sidebar('product-category-top-content') && $smof_data['ts_prod_cat_top_content']; ?> <div class="page-container <?php echo esc_attr($extra_class); ?> "> <!-- Left Sidebar --> <?php if ($page_column_class['left_sidebar']) { ?> <aside id="left-sidebar" class="ts-sidebar <?php echo esc_attr($page_column_class['left_sidebar_class']); ?> ">
function extra_woocommerce_output_content_wrapper() { echo ' <div id="main-content"> <div class="container"> <div id="content-area" class="clearfix"> <div class="et_pb_row woocommerce-page-top">'; if (!is_singular('product')) { echo '<h1 class="page-title">' . woocommerce_page_title(false) . '</h1>'; } woocommerce_breadcrumb(); echo ' </div> <div class="et_pb_extra_column_main">'; }
/** * Title controller. * */ function dt_woocommerce_title_controller() { $config = Presscore_Config::get_instance(); $title_mode = $config->get('header_title'); if ('disabled' != $title_mode) { $title_align = of_get_option('general-title_align', 'center'); $title_classes = array('page-title'); switch ($title_align) { case 'right': $title_classes[] = 'title-right'; break; case 'left': $title_classes[] = 'title-left'; break; default: $title_classes[] = 'title-center'; } $before_title = '<div class="' . esc_attr(implode(' ', $title_classes)) . '"><div class="wf-wrap"><div class="wf-table">'; $after_title = '</div></div></div>'; $breadcrumbs = apply_filters('dt_sanitize_flag', of_get_option('general-show_breadcrumbs', 1)); echo $before_title; if ('right' == $title_align) { if ($breadcrumbs) { echo presscore_get_breadcrumbs(); } echo '<div class="wf-td"><h1>'; woocommerce_page_title(); echo '</h1></div>'; } else { echo '<div class="wf-td"><h1>'; woocommerce_page_title(); echo '</h1></div>'; if ($breadcrumbs) { echo presscore_get_breadcrumbs(); } } echo $after_title; } }
function miss_woocommerce_content() { if (is_singular('product')) { while (have_posts()) { the_post(); woocommerce_get_template_part('content', 'single-product'); } } else { ?> <?php if (apply_filters('woocommerce_show_page_title', true)) { ?> <div class="bread-container"> <div class="bread-wrapper"> <div class="blog-title"><?php woocommerce_page_title(); ?> </div> <?php dimox_breadcrumbs(); ?> </div> </div> <?php } ?> <?php do_action('woocommerce_archive_description'); ?> <?php if (have_posts()) { ?> <?php do_action('woocommerce_before_shop_loop'); ?> <?php woocommerce_product_loop_start(); ?> <?php woocommerce_product_subcategories(); ?> <?php while (have_posts()) { the_post(); ?> <?php woocommerce_get_template_part('content', 'product'); ?> <?php } // end of the loop. ?> <?php woocommerce_product_loop_end(); ?> <?php do_action('woocommerce_after_shop_loop'); ?> <?php } elseif (!woocommerce_product_subcategories(array('before' => woocommerce_product_loop_start(false), 'after' => woocommerce_product_loop_end(false)))) { ?> <?php woocommerce_get_template('loop/no-products-found.php'); ?> <?php } } }
function dh_page_title($echo = true) { $title = ""; if (is_category()) { $title = single_cat_title('', false); } elseif (is_day()) { $title = __('Archive for date:', DH_DOMAIN) . " " . get_the_time('F jS, Y'); } elseif (is_month()) { $title = __('Archive for month:', DH_DOMAIN) . " " . get_the_time('F, Y'); } elseif (is_year()) { $title = __('Archive for year:', DH_DOMAIN) . " " . get_the_time('Y'); } elseif (is_search()) { global $wp_query; if (!empty($wp_query->found_posts)) { if ($wp_query->found_posts > 1) { $title = $wp_query->found_posts . " " . __('search results for', DH_DOMAIN) . ' <span class="search-query">' . esc_attr(get_search_query()) . '</span>'; } else { $title = $wp_query->found_posts . " " . __('search result for', DH_DOMAIN) . ' <span class="search-query">' . esc_attr(get_search_query()) . '</span>'; } } else { if (!empty($_GET['s'])) { $title = __('Search results for', DH_DOMAIN) . ' <span class="search-query">' . esc_attr(get_search_query()) . '</span>'; } else { $title = __('To search the site please enter a valid term', DH_DOMAIN); } } } elseif (is_author()) { $curauth = get_query_var('author_name') ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author')); if (isset($curauth->nickname)) { $title = $curauth->nickname; } } elseif (is_tag()) { $title = single_tag_title('', false); } elseif (is_tax()) { $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); $title = $term->name; } elseif (is_front_page() && !is_home()) { $title = get_the_title(get_option('page_on_front')); } elseif (is_home() && !is_front_page()) { $title = get_the_title(get_option('page_for_posts')); } elseif (is_404()) { $title = __('404 - Page not found', DH_DOMAIN); } else { $title = get_the_title(); } if (isset($_GET['paged']) && !empty($_GET['paged'])) { $title .= " (" . __('Page', DH_DOMAIN) . " " . $_GET['paged'] . ")"; } if (defined('WOOCOMMERCE_VERSION') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) { // if( ! is_product() ) { // $title = woocommerce_page_title( false ); // }else{ // $title = // } $title = woocommerce_page_title(false); } if (is_post_type_archive('portfolio')) { $title = esc_html(dh_get_theme_option('portfolio-archive-title', __('My Portfolio', DH_DOMAIN))); } if ($echo) { echo dhecho($title); } else { return $title; } }
/** * Page title * * @since 1.0.0 */ public static function getPageTitle() { global $tb_meta; if (!is_archive()) { /* page. */ if (is_page()) { /* custom title. */ if (!empty($tb_meta->_tb_page_title_text) && $tb_meta->_tb_page_title_text) { echo esc_attr($tb_meta->_tb_page_title_text); } else { the_title(); } /* blog */ } elseif (is_front_page()) { _e('Blog', 'leonard'); /* search */ } elseif (is_search()) { printf(__('Search Results for: %s', 'leonard'), '<span>' . get_search_query() . '</span>'); /* 404 */ } elseif (is_404()) { _e('404', 'leonard'); /* other */ } else { the_title(); } } else { /* category. */ if (is_category()) { single_cat_title(); } elseif (is_tag()) { /* tag. */ single_tag_title(); /* author. */ } elseif (is_author()) { printf(__('Author: %s', 'leonard'), '<span class="vcard">' . get_the_author() . '</span>'); /* date */ } elseif (is_day()) { printf(__('Day: %s', 'leonard'), '<span>' . get_the_date() . '</span>'); } elseif (is_month()) { printf(__('Month: %s', 'leonard'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'leonard')) . '</span>'); } elseif (is_year()) { printf(__('Year: %s', 'leonard'), '<span>' . get_the_date(_x('Y', 'yearly archives date format', 'leonard')) . '</span>'); /* post format */ } elseif (is_tax('post_format', 'post-format-aside')) { _e('Asides', 'leonard'); } elseif (is_tax('post_format', 'post-format-gallery')) { _e('Galleries', 'leonard'); } elseif (is_tax('post_format', 'post-format-image')) { _e('Images', 'leonard'); } elseif (is_tax('post_format', 'post-format-video')) { _e('Videos', 'leonard'); } elseif (is_tax('post_format', 'post-format-quote')) { _e('Quotes', 'leonard'); } elseif (is_tax('post_format', 'post-format-link')) { _e('Links', 'leonard'); } elseif (is_tax('post_format', 'post-format-status')) { _e('Statuses', 'leonard'); } elseif (is_tax('post_format', 'post-format-audio')) { _e('Audios', 'leonard'); } elseif (is_tax('post_format', 'post-format-chat')) { _e('Chats', 'leonard'); /* woocommerce */ } elseif (class_exists('Woocommerce') && is_woocommerce()) { woocommerce_page_title(); } else { /* other */ the_title(); } } }
function avada_current_page_title_bar($post_id) { global $smof_data; ob_start(); if ($smof_data['breadcrumb']) { if ($smof_data['page_title_bar_bs'] == 'Breadcrumbs') { if (class_exists('Woocommerce') && is_woocommerce() || (is_tax('product_cat') || is_tax('product_tag'))) { woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'delimiter' => '')); } else { if (class_exists('bbPress') && is_bbpress()) { bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => ' ', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => __('Home', 'Avada'))); } else { themefusion_breadcrumb(); } } } else { get_search_form(); } } $secondary_content = ob_get_contents(); ob_get_clean(); $title = ''; $subtitle = ''; if (get_post_meta($post_id, 'pyre_page_title_custom_text', true) != '') { $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true); } if (get_post_meta($post_id, 'pyre_page_title_custom_subheader', true) != '') { $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true); } if (!$title) { $title = get_the_title(); if (is_home()) { $title = $smof_data['blog_title']; } if (is_search()) { $title = __('Search results for:', 'Avada') . get_search_query(); } if (is_404()) { $title = __('Error 404 Page', 'Avada'); } if (is_archive()) { if (is_day()) { $title = __('Daily Archives:', 'Avada') . '<span> ' . get_the_date() . '</span>'; } else { if (is_month()) { $title = __('Monthly Archives:', 'Avada') . '<span> ' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>'; } elseif (is_year()) { $title = __('Yearly Archives:', 'Avada') . '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>'; } elseif (is_author()) { $curauth = isset($_GET['author_name']) ? get_user_by('slug', $_GET['author_name']) : get_user_by('id', get_the_author_meta('ID')); $title = $curauth->nickname; } else { $title = single_cat_title('', false); } } } if (class_exists('Woocommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) { if (!is_product()) { $title = woocommerce_page_title(false); } } } if (!$subtitle) { if (is_home() && !is_front_page()) { $subtitle = $smof_data['blog_subtitle']; } } if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) { if (get_post_meta($post_id, 'pyre_page_title', true) == 'yes' || $smof_data['page_title_bar'] && get_post_meta($post_id, 'pyre_page_title', true) == 'default') { if (get_post_meta($post_id, 'pyre_page_title_text', true) == 'no') { $title = ''; $subtitle = ''; } avada_page_title_bar($title, $subtitle, $secondary_content); } } else { if ($smof_data['page_title_bar']) { avada_page_title_bar($title, $subtitle, $secondary_content); } } }
public static function breadcrumbs() { global $post, $pagename; /* ================ Settings ================ */ $delimiter = ' / '; // separator $sign = null; // text before breadcrumbs $home = __('Home', 'grandway'); // homepage name $showCurrent = 1; // 1 - show current page, 0 - don't show $before = null; // before crumb tag $after = null; // after crumb tag /* ============== Settings END ============== */ $homeLink = home_url(); $get_post_type = get_post_type(); // WooCommerce $woo = PhoenixTeam_Utils::dep_exists('woocommerce'); if ($woo) { if (function_exists('is_shop')) { $woo_shop = is_shop(); ob_start(); woocommerce_page_title(); $woo_title = ob_get_clean(); } } echo '<div class="col-lg-6 pull-right"><div class="page-in-bread">'; echo wp_kses_post($sign) . '<a href="' . esc_url($homeLink) . '" title="' . __('Home Page', 'grandway') . '">' . esc_html($home) . '</a> ' . esc_html($delimiter) . ' '; $posts_page = self::check_posts_page(); if ($posts_page && $pagename == $posts_page->post_name) { if (get_query_var('paged')) { $this_permalink = get_permalink($posts_page->ID); echo esc_html($before) . '<a href="' . esc_url($this_permalink) . '" title="' . esc_attr($posts_page->post_title) . '">' . esc_html($posts_page->post_title) . '</a>' . esc_html($after); } else { echo esc_html($before) . esc_html($posts_page->post_title) . esc_html($after); } } if (is_category()) { $thisCat = get_category(get_query_var('cat'), false); if ($thisCat->parent != 0) { echo '' . get_category_parents($thisCat->parent, TRUE, ' ' . esc_html($delimiter) . ' ') . ''; } echo esc_html($before) . single_cat_title('', false) . esc_html($after); } elseif (is_search()) { echo esc_html($before) . __('Search for: ', 'grandway') . ' "' . get_search_query() . '"' . esc_html($after); } elseif (is_day()) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . esc_html($delimiter) . ' '; echo '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . esc_html($delimiter) . ' '; echo esc_html($before) . get_the_time('d') . esc_html($after); } elseif (is_month()) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . esc_html($delimiter) . ' '; echo esc_html($before) . get_the_time('F') . esc_html($after); } elseif (is_year()) { echo esc_html($before) . get_the_time('Y') . esc_html($after); } elseif (is_single() && !is_attachment()) { if ($get_post_type != 'post') { $post_type = get_post_type_object($get_post_type); $slug = $post_type->rewrite; echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/" onclick="jQuery(function($){event.preventDefault(); window.history.back();});">' . $post_type->labels->name . '</a>'; if ($showCurrent == 1) { echo ' ' . esc_html($delimiter) . ' ' . esc_html($before) . esc_html(get_the_title()) . esc_html($after) . "\n"; } } else { $cat = get_the_category(); $cat = $cat[0]; $cats = get_category_parents($cat, TRUE, ' ' . esc_html($delimiter) . ' '); if ($showCurrent == 0) { $cats = preg_replace("#^(.+)\\sesc_html({$delimiter})\\s\$#", "\$1", $cats); } echo wp_kses_post($cats); if ($showCurrent == 1) { echo esc_html($before) . esc_html(get_the_title()) . esc_html($after); } } // WooCommerce } elseif ($woo && $woo_shop) { echo esc_html($before) . esc_html($woo_title) . esc_html($after); // Othec CPTs } elseif (!is_single() && !is_page() && $get_post_type != 'post' && !is_404()) { $post_type = get_post_type_object($get_post_type); echo esc_html($before) . esc_html($post_type->labels->singular_name) . "/" . esc_html($after); } elseif (is_attachment()) { $parent = get_post($post->post_parent); $cat = get_the_category($parent->ID); if ($cat) { $cat = $cat[0]; echo '' . get_category_parents($cat, TRUE, ' ' . esc_html($delimiter) . ' ') . ''; } echo '<a href="' . esc_url(get_permalink($parent)) . '">' . esc_html($parent->post_title) . '</a>'; if ($showCurrent == 1) { echo ' ' . esc_html($delimiter) . ' ' . esc_html($before) . esc_html(get_the_title()) . esc_html($after); } } elseif (is_page() && !$post->post_parent) { if (get_query_var('paged')) { if ($showCurrent == 1) { echo esc_html($before) . '<a href="' . esc_url(get_permalink($post->ID)) . '">' . esc_html(get_the_title($post->ID)) . '</a>' . esc_html($after); } } else { if ($showCurrent == 1) { echo esc_html($before) . esc_html(get_the_title()) . esc_html($after); } } } elseif (is_page() && $post->post_parent) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '<a href="' . esc_url(get_permalink($page->ID)) . '">' . esc_html(get_the_title($page->ID)) . '</a>'; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); for ($i = 0; $i < count($breadcrumbs); $i++) { echo wp_kses_post($breadcrumbs[$i]); if ($i != count($breadcrumbs) - 1) { echo ' ' . esc_html($delimiter) . ' '; } } if ($showCurrent == 1) { echo esc_html($delimiter) . esc_html($before) . esc_html(get_the_title()) . esc_html($after); } } elseif (is_tag()) { echo esc_html($before) . single_tag_title('', false) . esc_html($after); } elseif (is_author()) { global $author; $userdata = get_userdata($author); echo esc_html($before) . ' ' . $userdata->display_name . esc_html($after); } elseif (is_404()) { echo esc_html($before) . __('404 page', 'grandway') . esc_html($after); } if (get_query_var('paged')) { if (is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author()) { echo esc_html($delimiter) . __('Page ', 'grandway') . get_query_var('paged'); } } echo '</div></div>'; }
function sf_page_heading() { global $wp_query, $post, $sf_options; $shop_page = false; $page_title = $page_subtitle = $page_title_style = $page_title_overlay_effect = $fancy_title_image_url = $article_heading_bg = $article_heading_text = $page_heading_el_class = $page_design_style = $extra_styles = $page_title_text_align = ""; $show_page_title = apply_filters('sf_page_heading_ns_pagetitle', 1); $remove_breadcrumbs = apply_filters('sf_page_heading_ns_removebreadcrumbs', 0); $breadcrumb_in_heading = 0; if (isset($sf_options['breadcrumb_in_heading'])) { $breadcrumb_in_heading = $sf_options['breadcrumb_in_heading']; } $page_title_height = 300; $page_title_style = "standard"; $next_icon = apply_filters('sf_next_icon', '<i class="ss-navigateright"></i>'); $prev_icon = apply_filters('sf_prev_icon', '<i class="ss-navigateleft"></i>'); // Shop page check if (function_exists('is_shop') && is_shop() || function_exists('is_product_category') && is_product_category()) { $shop_page = true; } // Defaults $default_show_page_heading = $sf_options['default_show_page_heading']; $pagination_style = "standard"; if (isset($sf_options['pagination_style'])) { $pagination_style = $sf_options['pagination_style']; } // Post meta if ($post && is_singular()) { $show_page_title = sf_get_post_meta($post->ID, 'sf_page_title', true); $remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true); $page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true); $page_title = sf_get_post_meta($post->ID, 'sf_page_title_one', true); $page_subtitle = sf_get_post_meta($post->ID, 'sf_page_subtitle', true); $fancy_title_image = rwmb_meta('sf_page_title_image', 'type=image&size=full'); $page_title_text_style = sf_get_post_meta($post->ID, 'sf_page_title_text_style', true); $page_title_overlay_effect = sf_get_post_meta($post->ID, 'sf_page_title_overlay_effect', true); $page_title_text_align = sf_get_post_meta($post->ID, 'sf_page_title_text_align', true); $page_title_height = sf_get_post_meta($post->ID, 'sf_page_title_height', true); $page_heading_bg = sf_get_post_meta($post->ID, 'sf_page_title_bg_color', true); $page_heading_text = sf_get_post_meta($post->ID, 'sf_page_title_text_color', true); if ($page_heading_bg != "") { $article_heading_bg = 'style="background-color:' . $page_heading_bg . ';border-color:' . $page_heading_bg . ';"'; } if ($page_heading_text != "") { $article_heading_text = 'style="color:' . $page_heading_text . ';"'; } } if (is_singular('post')) { $fw_media_display = sf_get_post_meta($post->ID, 'sf_fw_media_display', true); $page_design_style = sf_get_post_meta($post->ID, 'sf_page_design_style', true); if ($fw_media_display == "fw-media-title") { return; } } // Portfolio category navigation $enable_category_navigation = $sf_options['enable_category_navigation']; // Woo setup if ($shop_page) { $show_page_title = $sf_options['woo_show_page_heading']; $page_title_style = $sf_options['woo_page_heading_style']; $fancy_title_image = $sf_options['woo_page_heading_image']; $page_title_text_style = $sf_options['woo_page_heading_text_style']; if (isset($sf_options['woo_page_heading_text_align'])) { $page_title_text_align = $sf_options['woo_page_heading_text_align']; } if (isset($fancy_title_image) && isset($fancy_title_image['url'])) { $fancy_title_image_url = $fancy_title_image['url']; } if (is_product_category()) { $category = $wp_query->get_queried_object(); $hero_id = get_woocommerce_term_meta($category->term_id, 'hero_id', true); if ($hero_id != "" && $hero_id != 0) { $fancy_title_image_url = wp_get_attachment_url($hero_id, 'full'); } } } if (function_exists('is_product') && is_product()) { $product_layout = sf_get_post_meta($post->ID, 'sf_product_layout', true); if ($product_layout == "fw-split") { return; } } // Page Title if ($show_page_title == "") { $show_page_title = $default_show_page_heading; } if ($page_title == "") { $page_title = get_the_title(); } if ($page_title_height == "") { $page_title_height = apply_filters('sf_shop_fancy_page_height', 300); } // Fancy heading image if (($page_title_style == "fancy" || $page_title_style == "fancy-tabbed") && $fancy_title_image_url == "") { foreach ($fancy_title_image as $detail_image) { if (isset($detail_image['url'])) { $fancy_title_image_url = $detail_image['url']; break; } } if (!$fancy_title_image) { $fancy_title_image = get_post_thumbnail_id(); $fancy_title_image_url = wp_get_attachment_url($fancy_title_image, 'full'); } } // Page Title Hidden if (!$show_page_title) { $page_heading_el_class = "page-heading-hidden"; } // Breadcrumb in heading if ($breadcrumb_in_heading) { $page_heading_el_class .= " page-heading-breadcrumbs"; } if ($page_title_style == "fancy-tabbed") { $page_title_text_align = "left"; } // Return if product & inner heading if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && ($page_title_style == "standard" || $page_title_style == "")) { return; } // Dont' allow fancy-tabbed on product pages if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && $page_title_style == "fancy-tabbed") { $page_title_style = "fancy"; } if ($page_title_style == "fancy" && sf_theme_opts_name() == "sf_atelier_options" && !(function_exists('is_product') && is_product())) { $extra_styles = 'height: ' . $page_title_height . 'px;'; } if (isset($sf_options['minimal_checkout'])) { if (function_exists('is_checkout') && is_checkout()) { global $woocommerce; if ($sf_options['minimal_checkout']) { ?> <div class="minimal-checkout-return container"><a href="<?php echo esc_url($woocommerce->cart->get_cart_url()); ?> "><?php _e("Return to cart", "swiftframework"); ?> </a></div> <?php } } } if (!is_home()) { ?> <?php if ($page_title_style == "fancy" || $page_title_style == "fancy-tabbed") { ?> <div class="fancy-heading-wrap <?php echo esc_attr($page_title_style); ?> -style"> <?php if ($fancy_title_image_url != "") { $bg_color_title = $bg_opacity_title = ""; if ($post) { $bg_color_title = sf_get_post_meta($post->ID, 'sf_bg_color_title', true); $bg_opacity_title = sf_get_post_meta($post->ID, 'sf_bg_opacity_title', true); } if (!$bg_color_title) { $bg_color_title = "transparent"; $bg_opacity_title = "0"; } ?> <div class="page-heading fancy-heading clearfix <?php echo esc_attr($page_title_text_style); ?> -style fancy-image <?php echo esc_attr($page_heading_el_class); ?> " style="background-image: url(<?php echo esc_url($fancy_title_image_url); ?> );<?php echo $extra_styles; ?> " data-height="<?php echo esc_attr($page_title_height); ?> "> <span class="media-overlay" style="background-color:<?php echo $bg_color_title; ?> ;opacity:<?php echo $bg_opacity_title / 100; ?> ;"></span> <?php } else { ?> <div class="page-heading fancy-heading <?php echo esc_attr($page_heading_el_class); ?> clearfix" data-height="<?php echo esc_attr($page_title_height); ?> " <?php echo $article_heading_bg; ?> > <?php } ?> <?php if ($page_title_style == "fancy" && $page_design_style == "hero-content-split") { sf_post_split_heading_buttons(); } ?> <?php if ($page_title_style == "fancy-tabbed") { ?> <div class="tabbed-heading-wrap"> <?php } ?> <div class="heading-text container" data-textalign="<?php echo esc_attr($page_title_text_align); ?> "> <?php if (sf_woocommerce_activated() && is_woocommerce()) { ?> <?php if (is_product()) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo $page_title; ?> </h1> <?php } else { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php woocommerce_page_title(); ?> </h1> <?php } ?> <?php } else { ?> <h1 class="entry-title"><?php echo $page_title; ?> </h1> <?php } ?> <?php if ($page_subtitle) { ?> <h3><?php echo $page_subtitle; ?> </h3> <?php } ?> <?php if (!$remove_breadcrumbs && $breadcrumb_in_heading) { echo sf_breadcrumbs(true); } ?> <?php if (is_singular('portfolio') && !(sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow")) { ?> <div class="prev-item" <?php echo $article_heading_text; ?> ><?php next_post_link('%link', $prev_icon, $enable_category_navigation, '', 'portfolio-category'); ?> </div> <div class="next-item" <?php echo $article_heading_text; ?> ><?php previous_post_link('%link', $next_icon, $enable_category_navigation, '', 'portfolio-category'); ?> </div> <?php } ?> <?php if (is_singular('galleries') && !(sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow")) { ?> <div class="prev-item" <?php echo $article_heading_text; ?> ><?php next_post_link('%link', $prev_icon, false, '', 'gallery-category'); ?> </div> <div class="next-item" <?php echo $article_heading_text; ?> ><?php previous_post_link('%link', $next_icon, false, '', 'gallery-category'); ?> </div> <?php } ?> </div> <?php if ($page_title_style == "fancy-tabbed") { ?> </div> <?php } ?> <?php if ($page_title_overlay_effect != "" && $page_title_overlay_effect != "none") { ?> <div class="sf-canvas-effect" data-type="<?php echo esc_attr($page_title_overlay_effect); ?> "> <canvas id="page-heading-canvas" data-canvas_id="page-heading-canvas"></canvas> </div> <?php } ?> </div> </div> <?php } else { ?> <?php if ($show_page_title == 2) { ?> <div class="page-heading ph-sort clearfix" <?php echo $article_heading_bg; ?> > <?php } else { ?> <div class="page-heading <?php echo esc_attr($page_heading_el_class); ?> clearfix" <?php echo $article_heading_bg; ?> > <?php } ?> <div class="container"> <div class="heading-text"> <?php if (sf_woocommerce_activated() && is_woocommerce()) { ?> <?php if (is_product()) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo $page_title; ?> </h1> <?php } else { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php woocommerce_page_title(); ?> </h1> <?php } ?> <?php } else { if (is_search()) { ?> <?php $s = get_search_query(); $allsearch = new WP_Query("s={$s}&showposts=-1"); $key = esc_html($s, 1); $count = $allsearch->post_count; wp_reset_query(); ?> <?php if ($count == 1) { ?> <?php printf(__('<h1>%1$s result for <span>%2$s</span></h1>', 'swiftframework'), $count, get_search_query()); ?> <?php } else { ?> <?php printf(__('<h1>%1$s results for <span>%2$s</span></h1>', 'swiftframework'), $count, get_search_query()); ?> <?php } ?> <?php } else { if (is_category()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php single_cat_title(); ?> </h1> <?php } else { if (is_archive()) { ?> <?php /* If this is a tag archive */ if (is_tag()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Posts tagged with", "swiftframework"); ?> ‘<?php single_tag_title(); ?> ’</h1> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Archive for", "swiftframework"); ?> <?php the_time('F jS, Y'); ?> </h1> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Archive for", "swiftframework"); ?> <?php the_time('F, Y'); ?> </h1> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Archive for", "swiftframework"); ?> <?php the_time('Y'); ?> </h1> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <?php $author = get_userdata(get_query_var('author')); ?> <?php if (class_exists('ATCF_Campaigns')) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Projects by", "swiftframework"); ?> <?php echo esc_attr($author->display_name); ?> </h1> <?php } else { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Author archive for", "swiftframework"); ?> <?php echo esc_attr($author->display_name); ?> </h1> <?php } ?> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Blog Archives", "swiftframework"); ?> </h1> <?php } else { ?> <h1 <?php echo $article_heading_text; ?> ><?php post_type_archive_title(); ?> </h1> <?php } ?> <?php } else { if (is_404()) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php _e("404", "swiftframework"); ?> </h1> <?php } else { if (is_home() && get_option('page_for_posts')) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo apply_filters('the_title', get_page(get_option('page_for_posts'))->post_title); ?> </h1> <?php } else { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo $page_title; ?> </h1> <?php } } } } } } ?> </div> <?php if (is_singular('portfolio') && !(sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow")) { ?> <div class="next-item" <?php echo $article_heading_text; ?> ><?php previous_post_link('%link', $next_icon, $enable_category_navigation, '', 'portfolio-category'); ?> </div> <div class="prev-item" <?php echo $article_heading_text; ?> ><?php next_post_link('%link', $prev_icon, $enable_category_navigation, '', 'portfolio-category'); ?> </div> <?php } ?> <?php if (is_singular('galleries') && !(sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow")) { ?> <div class="next-item" <?php echo $article_heading_text; ?> ><?php previous_post_link('%link', $next_icon, false, '', 'gallery-category'); ?> </div> <div class="prev-item" <?php echo $article_heading_text; ?> ><?php next_post_link('%link', $prev_icon, false, '', 'gallery-category'); ?> </div> <?php } ?> <?php if (!$remove_breadcrumbs && $breadcrumb_in_heading) { echo sf_breadcrumbs(true); } ?> <?php if ($shop_page && sf_theme_supports('page-heading-woocommerce')) { woocommerce_catalog_ordering(); woocommerce_result_count(); } ?> </div> </div> <?php } } }
function mk_page_title() { global $mk_options; $post_id = global_get_post_id(); if (is_singular('product') && $mk_options['woocommerce_single_product_title'] == 'false') { return false; } if (is_singular('employees')) { return false; } if ($post_id && (get_post_meta($post_id, '_template', true) == 'no-title' || get_post_meta($post_id, '_template', true) == 'no-header-title' || get_post_meta($post_id, '_template', true) == 'no-header-title-footer' || get_post_meta($post_id, '_template', true) == 'no-footer-title')) { return false; } if (global_get_post_id() && get_post_meta($post_id, '_enable_slidehsow', true) == 'true' || is_404()) { return false; } $align = $title = $subtitle = $shadow_css = ''; if ($post_id) { $custom_page_title = get_post_meta($post_id, '_custom_page_title', true); if (!empty($custom_page_title)) { $title = $custom_page_title; } else { $title = get_the_title($post_id); } $subtitle = get_post_meta($post_id, '_page_introduce_subtitle', true); $align = get_post_meta($post_id, '_introduce_align', true); } /* Loads Archive Page Headings */ if (is_archive()) { $title = $mk_options['archive_page_title']; if (is_category()) { $subtitle = sprintf(__('Category Archive for: "%s"', 'mk_framework'), single_cat_title('', false)); } elseif (is_tag()) { $subtitle = sprintf(__('Tag Archives for: "%s"', 'mk_framework'), single_tag_title('', false)); } elseif (is_day()) { $subtitle = sprintf(__('Daily Archive for: "%s"', 'mk_framework'), get_the_time('F jS, Y')); } elseif (is_month()) { $subtitle = sprintf(__('Monthly Archive for: "%s"', 'mk_framework'), get_the_time('F, Y')); } elseif (is_year()) { $subtitle = sprintf(__('Yearly Archive for: "%s"', 'mk_framework'), get_the_time('Y')); } elseif (is_author()) { if (get_query_var('author_name')) { $curauth = get_user_by('slug', get_query_var('author_name')); } else { $curauth = get_userdata(get_query_var('author')); } $subtitle = sprintf(__('Author Archive for: "%s"'), $curauth->nickname); } elseif (is_tax()) { $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); $subtitle = sprintf(__('Archives for: "%s"', 'mk_framework'), $term->name); } if ($mk_options['archive_disable_subtitle'] == 'false') { $subtitle = ''; } } if (function_exists('is_bbpress') && is_bbpress()) { if (bbp_is_forum_archive()) { $title = bbp_get_forum_archive_title(); } elseif (bbp_is_topic_archive()) { $title = bbp_get_topic_archive_title(); } elseif (bbp_is_single_view()) { $title = bbp_get_view_title(); } elseif (bbp_is_single_forum()) { $forum_id = get_queried_object_id(); $forum_parent_id = bbp_get_forum_parent_id($forum_id); //if ( 0 !== $forum_parent_id ) //$title = breadcrumbs_plus_get_parents( $forum_parent_id ); $title = bbp_get_forum_title($forum_id); } elseif (bbp_is_single_topic()) { $topic_id = get_queried_object_id(); $title = bbp_get_topic_title($topic_id); } elseif (bbp_is_single_user() || bbp_is_single_user_edit()) { $title = bbp_get_displayed_user_field('display_name'); } } if (function_exists('is_woocommerce') && is_woocommerce() && !empty($post_id)) { ob_start(); woocommerce_page_title(); $title = ob_get_clean(); } if (function_exists('is_woocommerce') && is_woocommerce()) { $title = __('Shop', 'mk_framework'); if (is_archive() || is_singular('product')) { $title = isset($mk_options['woocommerce_category_page_title']) && !empty($mk_options['woocommerce_category_page_title']) ? $mk_options['woocommerce_category_page_title'] : __('Shop', 'mk_framework'); } } /* Loads Search Page Headings */ if (is_search()) { $title = $mk_options['search_page_title']; $allsearch = new WP_Query("s=" . get_search_query() . "&showposts=-1"); $count = $allsearch->post_count; wp_reset_query(); $subtitle = $count . ' ' . sprintf(__('Search Results for: "%s"', 'mk_framework'), stripslashes(strip_tags(get_search_query()))); if ($mk_options['search_disable_subtitle'] == 'false') { $subtitle = ''; } } if ($mk_options['page_title_shadow'] == 'true') { $shadow_css = 'mk-drop-shadow'; } $align = !empty($align) ? $align : 'left'; echo '<section id="mk-page-introduce" class="intro-' . $align . '">'; echo '<div class="mk-grid">'; if (!empty($title)) { echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>'; } if (!empty($subtitle)) { echo '<div class="page-introduce-subtitle">'; echo $subtitle; echo '</div>'; } if ($mk_options['disable_breadcrumb'] == 'true') { if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') { do_action('theme_breadcrumbs', $post_id); } } echo '<div class="clearboth"></div></div></section>'; }
function avada_current_page_title_bar($post_id) { global $smof_data; ob_start(); if ($smof_data['breadcrumb']) { if ($smof_data['page_title_bar_bs'] == 'Breadcrumbs') { if (class_exists('Woocommerce') && is_woocommerce() || (is_tax('product_cat') || is_tax('product_tag'))) { woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'delimiter' => '')); } else { if (class_exists('bbPress') && is_bbpress()) { bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => ' ', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => __('Home', 'Avada'))); } else { themefusion_breadcrumb(); } } } else { get_search_form(); } } $secondary_content = ob_get_contents(); ob_get_clean(); $title = ''; $subtitle = ''; if (get_post_meta($post_id, 'pyre_page_title_custom_text', true) != '') { $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true); } if (get_post_meta($post_id, 'pyre_page_title_custom_subheader', true) != '') { $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true); } if (!$title) { $title = get_the_title(); if (is_home()) { $title = $smof_data['blog_title']; } if (is_search()) { $title = __('Rezultati pretrage za:', 'Avada') . get_search_query(); } if (is_404()) { $title = __('Error 404 Page', 'Avada'); } if (class_exists('TribeEvents') && tribe_is_event() && !is_single() || class_exists('TribeEvents') && is_events_archive() && is_404()) { $title = tribe_get_events_title(); } if (is_archive() && !is_bbpress()) { if (is_day()) { $title = __('Dnevna arhiva:', 'Avada') . '<span> ' . get_the_date() . '</span>'; } else { if (is_month()) { $title = __('Mjesečna arhiva:', 'Avada') . '<span> ' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>'; } elseif (is_year()) { $title = __('Godišnja arhiva:', 'Avada') . '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>'; } elseif (is_author()) { $curauth = get_user_by('id', get_query_var('author')); $title = $curauth->nickname; } else { $title = single_cat_title('', false); } } } if (class_exists('Woocommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) { if (!is_product()) { $title = woocommerce_page_title(false); } } } if (!$subtitle) { if (is_home()) { $subtitle = $smof_data['blog_subtitle']; } } if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) { if (get_post_meta($post_id, 'pyre_page_title', true) == 'yes' || $smof_data['page_title_bar'] && get_post_meta($post_id, 'pyre_page_title', true) != 'no') { if (get_post_meta($post_id, 'pyre_page_title_text', true) == 'no') { $title = ''; $subtitle = ''; } if (is_home() && is_front_page() && !$smof_data['blog_show_page_title_bar']) { // do nothing } else { avada_page_title_bar($title, $subtitle, $secondary_content); } } } else { if (is_home() && !$smof_data['blog_show_page_title_bar']) { // do nothing } else { if ($smof_data['page_title_bar']) { avada_page_title_bar($title, $subtitle, $secondary_content); } } } }
function thb_woocommerce_theme_before_content() { ?> <?php if (!is_product()) { ?> <header class="pageheader"> <h1><?php woocommerce_page_title(); ?> </h1> <h2><?php woocommerce_result_count(); ?> </h2> </header><!-- /.pageheader --> <?php } ?> <?php if (is_shop()) { ?> <?php woocommerce_catalog_ordering(); ?> <?php } ?> <?php get_template_part('partial-header-closure'); ?> <?php thb_page_before(); ?> <section id="content"> <?php }
function sf_page_heading() { global $wp_query, $post; $shop_page = false; $page_title_bg = ""; $page_title = $page_subtitle = $page_title_style = $page_title_overlay_effect = $fancy_title_image_url = $article_heading_bg = $article_heading_text = $page_heading_el_class = $page_design_style = $extra_styles = $page_title_text_align = ""; $show_page_title = apply_filters('sf_page_heading_ns_pagetitle', 1); $remove_breadcrumbs = apply_filters('sf_page_heading_ns_removebreadcrumbs', 0); $page_title_height = 300; $page_title_style = "standard"; // Shop page check if (function_exists('is_shop') && is_shop() || function_exists('is_product_category') && is_product_category()) { $shop_page = true; } // Defaults $options = get_option('sf_dante_options'); $default_page_heading_bg_alt = $options['default_page_heading_bg_alt']; $default_show_page_heading = $options['default_show_page_heading']; $show_page_title = $default_show_page_heading; // Post meta if ($post && is_singular()) { $show_page_title = sf_get_post_meta($post->ID, 'sf_page_title', true); $remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true); $page_title = sf_get_post_meta($post->ID, 'sf_page_title_one', true); $page_subtitle = sf_get_post_meta($post->ID, 'sf_page_subtitle', true); $remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true); $page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true); $page_title_bg = sf_get_post_meta($post->ID, 'sf_page_title_bg', true); $fancy_title_image = rwmb_meta('sf_page_title_image', 'type=image&size=full'); $page_title_text_style = sf_get_post_meta($post->ID, 'sf_page_title_text_style', true); $fancy_title_image_url = ""; foreach ($fancy_title_image as $detail_image) { $fancy_title_image_url = $detail_image['url']; break; } } else { $page_title_bg = $default_page_heading_bg_alt; } // Woo setup if ($shop_page) { $show_page_title = $options['woo_show_page_heading']; $page_title_style = $options['woo_page_heading_style']; $page_title_bg = $options['woo_page_heading_bg_alt']; $fancy_title_image = $options['woo_page_heading_image']; $page_title_text_style = $options['woo_page_heading_text_style']; $fancy_title_image_url = $fancy_title_image; if (is_product_category()) { $category = $wp_query->get_queried_object(); $hero_id = get_woocommerce_term_meta($category->term_id, 'hero_id', true); if ($hero_id != "" && $hero_id != 0) { $fancy_title_image_url = wp_get_attachment_url($hero_id, 'full'); } } } // Page Title if ($page_title == "") { $page_title = get_the_title(); } if ($page_title_height == "") { $page_title_height = apply_filters('sf_shop_fancy_page_height', 300); } // Page Title Hidden if (!$show_page_title) { $page_heading_el_class = "page-heading-hidden"; } ?> <?php if ($page_title_style == "fancy") { ?> <div class="page-heading fancy-heading col-sm-12 clearfix asset-bg <?php echo $page_title_bg; ?> <?php echo $page_title_text_style; ?> -style fancy-image <?php echo esc_attr($page_heading_el_class); ?> " style="background-image: url(<?php echo $fancy_title_image_url; ?> );"> <?php } else { ?> <div class="page-heading <?php echo esc_attr($page_heading_el_class); ?> clearfix asset-bg <?php echo $page_title_bg; ?> "> <?php } ?> <div class="container"> <div class="heading-text"> <?php if (sf_woocommerce_activated() && is_woocommerce()) { ?> <?php if (is_product()) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo esc_attr($page_title); ?> </h1> <?php } else { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php woocommerce_page_title(); ?> </h1> <?php } ?> <?php } else { if (is_search()) { ?> <?php $s = get_search_query(); $allsearch = new WP_Query("s={$s}&showposts=-1"); $key = esc_html($s, 1); $count = $allsearch->post_count; wp_reset_query(); ?> <?php if ($count == 1) { ?> <?php printf(__('<h1>%1$s result for <span>%2$s</span></h1>', 'swiftframework'), $count, get_search_query()); ?> <?php } else { ?> <?php printf(__('<h1>%1$s results for <span>%2$s</span></h1>', 'swiftframework'), $count, get_search_query()); ?> <?php } ?> <?php } else { if (is_category()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php single_cat_title(); ?> </h1> <?php } else { if (is_archive()) { ?> <?php /* If this is a tag archive */ if (is_tag()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Posts tagged with", "swiftframework"); ?> ‘<?php single_tag_title(); ?> ’</h1> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Archive for", "swiftframework"); ?> <?php the_time('F jS, Y'); ?> </h1> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Archive for", "swiftframework"); ?> <?php the_time('F, Y'); ?> </h1> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Archive for", "swiftframework"); ?> <?php the_time('Y'); ?> </h1> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <?php $author = get_userdata(get_query_var('author')); ?> <?php if (class_exists('ATCF_Campaigns')) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Projects by", "swiftframework"); ?> <?php echo esc_attr($author->display_name); ?> </h1> <?php } else { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Author archive for", "swiftframework"); ?> <?php echo esc_attr($author->display_name); ?> </h1> <?php } ?> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h1 <?php echo $article_heading_text; ?> ><?php _e("Blog Archives", "swiftframework"); ?> </h1> <?php } else { ?> <h1 <?php echo $article_heading_text; ?> ><?php single_term_title(); ?> </h1> <?php } ?> <?php } else { if (is_404()) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php _e("404", "swiftframework"); ?> </h1> <?php } else { if (is_home() && get_option('page_for_posts')) { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo apply_filters('the_title', get_page(get_option('page_for_posts'))->post_title); ?> </h1> <?php } else { ?> <h1 class="entry-title" <?php echo $article_heading_text; ?> ><?php echo $page_title; ?> </h1> <?php } } } } } } ?> <?php if ($page_title_style == "fancy" && $page_subtitle != "") { ?> <h3><?php echo $page_subtitle; ?> </h3> <?php } ?> </div> <?php if (!$remove_breadcrumbs && $page_title_style != "fancy") { echo sf_breadcrumbs(true); } ?> </div> </div> <?php }
function avada_get_page_title_bar_contents($post_id, $get_secondary_content = TRUE) { if ($get_secondary_content) { ob_start(); if (fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id) != 'none') { if ('Breadcrumbs' == Avada()->settings->get('page_title_bar_bs') && in_array(get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true), array('breadcrumbs', 'default', '')) || 'breadcrumbs' == get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true)) { fusion_breadcrumbs(); } elseif ('Search Box' == Avada()->settings->get('page_title_bar_bs') && in_array(get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true), array('searchbar', 'default', '')) || 'searchbar' == get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true)) { get_search_form(); } } $secondary_content = ob_get_contents(); ob_get_clean(); } else { $secondary_content = ''; } $title = ''; $subtitle = ''; if ('' != get_post_meta($post_id, 'pyre_page_title_custom_text', true)) { $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true); } if ('' != get_post_meta($post_id, 'pyre_page_title_custom_subheader', true)) { $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true); } if ('' == get_post_meta($post_id, 'pyre_page_title_text', true) || 'default' == get_post_meta($post_id, 'pyre_page_title_text', true)) { $page_title_text = Avada()->settings->get('page_title_bar_text'); } else { $page_title_text = get_post_meta($post_id, 'pyre_page_title_text', true); } if (!$title) { $title = get_the_title(); if (is_home()) { $title = Avada()->settings->get('blog_title'); } if (is_search()) { $title = sprintf(__('Search results for: %s', 'Avada'), get_search_query()); } if (is_404()) { $title = __('Error 404 Page', 'Avada'); } if (class_exists('Tribe__Events__Main') && (tribe_is_event() && !is_single() && !is_home() || is_events_archive() || is_events_archive() && is_404())) { $title = tribe_get_events_title(); } if (is_archive() && !is_bbpress() && !is_search()) { if (is_day()) { $title = sprintf(__('Daily Archives: %s', 'Avada'), '<span>' . get_the_date() . '</span>'); } else { if (is_month()) { $title = sprintf(__('Monthly Archives: %s', 'Avada'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>'); } elseif (is_year()) { $title = sprintf(__('Yearly Archives: %s', 'Avada'), '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>'); } elseif (is_author()) { $curauth = get_user_by('id', get_query_var('author')); $title = $curauth->nickname; } elseif (is_post_type_archive()) { $title = post_type_archive_title('', false); $sermon_settings = get_option('wpfc_options'); if (is_array($sermon_settings)) { $title = $sermon_settings['archive_title']; } } else { $title = single_cat_title('', false); } } } if (class_exists('WooCommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) { if (!is_product()) { $title = woocommerce_page_title(false); } } } if (!$subtitle && is_home()) { $subtitle = Avada()->settings->get('blog_subtitle'); } if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) { if ('no' == $page_title_text && ('yes' == get_post_meta($post_id, 'pyre_page_title', true) || 'yes_without_bar' == get_post_meta($post_id, 'pyre_page_title', true) || 'hide' != Avada()->settings->get('page_title_bar') && 'no' != get_post_meta($post_id, 'pyre_page_title', true))) { $title = ''; $subtitle = ''; } } else { if ('hide' != Avada()->settings->get('page_title_bar') && 'no' == $page_title_text) { $title = ''; $subtitle = ''; } } return array($title, $subtitle, $secondary_content); }
wp_enqueue_script( 'jquery-cookie' ); ?> <?php /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action('woocommerce_before_main_content'); ?> <?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?> <h1 class="page-title"><?php woocommerce_page_title(); ?></h1> <?php endif; ?> <?php do_action( 'woocommerce_archive_description' ); ?> <?php if ( have_posts() ) : ?> <?php /** * woocommerce_pagination hook * * @hooked woocommerce_pagination - 10 * @hooked woocommerce_result_count - 20 * @hooked woocommerce_catalog_ordering - 30 */
?> has_cat_desc<?php } ?> <?php if (!empty($optimizer['hide_mob_page_header'])) { ?> hide_mob_headerimg<?php } ?> "> <!--The Page Title --> <div class="pagetitle_wrap"> <h1 class="postitle"><?php echo woocommerce_page_title('', true); ?> </h1> <?php if (!category_description()) { echo category_description(); } ?> </div> </div> <!--page_head class END--> <?php } ?> <?php }
</div> </div> </div> </div> <?php } if (class_exists('Woocommerce') && is_woocommerce() || (is_tax('product_cat') || is_tax('product_tag'))) { ?> <div class="bellow_header"> <div class="bellow_header_title"> <div class="page-title"> <?php echo '<' . $page_title_tag . '>'; if (!is_product()) { woocommerce_page_title(true); } else { the_title(); } echo '</' . $page_title_tag . '>'; ?> <div class="breadcrumb"> <?php woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'delimiter' => '', 'home' => _x('<i class="fa fa-home"></i>', 'breadcrumb', 'woocommerce'))); ?> </div> <?php if ($data['header_search_form']) { ?>
<div class="row"> <div class="col-md-12"> <div class="title-holder"> <div class="title-holder-cell text-<?php echo esc_attr(builtpress_opt_page('title_align', 'left')); ?> "> <?php $post_id = class_exists('Woocommerce') && is_woocommerce() ? get_option('woocommerce_shop_page_id') : get_the_ID(); $title_custom = get_post_meta($post_id, '_st_general_title_custom', TRUE); $sub_title = get_post_meta($post_id, '_st_general_title_sub', TRUE); if (class_exists('Woocommerce') && is_woocommerce()) { $page_title = !empty($title_custom) ? $title_custom : woocommerce_page_title(false); } else { $page_title = !empty($title_custom) ? $title_custom : get_the_title(); } echo '<h1 class="page-title"><span>' . esc_attr($page_title) . '</span></h1>'; if (!empty($sub_title)) { echo '<span class="page-subtitle">' . esc_attr($sub_title) . '</span>'; } if (builtpress_opt_page('title_breadcrumb')) { if (class_exists('Woocommerce') && is_woocommerce()) { woocommerce_breadcrumb(); } else { builtpress_breadcrumb(); } } ?>
*/ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } get_header('shop'); ?> <section class="centered page-header"> <div class="container"> <?php if (apply_filters('woocommerce_show_page_title', true)) { ?> <div class="col-lg-12"> <h1><?php woocommerce_page_title(); ?> </h1> </div> <?php } ?> </div> </section> <?php /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20
/** * Prints the Page Title inside the Title Container */ function quest_page_title() { if (function_exists('is_woocommerce') && is_woocommerce() && is_product()) { the_title(); } else { if (function_exists('is_woocommerce') && is_woocommerce()) { woocommerce_page_title(); } else { if (is_archive()) { single_cat_title(); } else { if (is_home()) { echo get_bloginfo('name'); } else { if (is_search()) { echo __('Search results for: ', 'quest') . get_search_query(); } else { the_title(); } } } } } }