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); } } } }
<?php printf( __( 'Monthly Archives: %s', 'Avada' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'Avada' ) ) . '</span>' ); ?> <?php elseif ( is_year() ) : ?> <?php printf( __( 'Yearly Archives: %s', 'Avada' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'Avada' ) ) . '</span>' ); ?> <?php elseif ( is_author() ) : ?> <?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?> <?php echo $curauth->nickname; ?> <?php else : ?> <?php single_cat_title(); ?> <?php endif; ?> </h1> </div> <?php if($data['breadcrumb']): ?> <?php if($data['page_title_bar_bs'] == 'Breadcrumbs'): ?> <?php themefusion_breadcrumb(); ?> <?php else: ?> <?php get_search_form(); ?> <?php endif; ?> <?php endif; ?> </div> </div> </div> <?php endif; ?> <?php endif; // end class check if for woocommerce ?> <?php if( class_exists('bbPress')): if(is_bbpress()): ?> <div class="page-title-container"> <div class="page-title"> <div class="page-title-wrapper">
?> <?php single_cat_title(); ?> <?php } ?> </h1> <?php if ($data['breadcrumb']) { ?> <?php if ($data['page_title_bar_bs'] == 'Breadcrumbs') { ?> <?php themefusion_breadcrumb(); ?> <?php } else { ?> <?php get_search_form(); ?> <?php } ?> <?php } ?> </div> </div>
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); } } }