Skip to content

Instantly share code, notes, and snippets.

@danjjohnson
Created November 9, 2014 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danjjohnson/0e6e31dbd4ddbf564ead to your computer and use it in GitHub Desktop.
Save danjjohnson/0e6e31dbd4ddbf564ead to your computer and use it in GitHub Desktop.
Remove Sensei_message from Appply title
function woo_display_top_section() {
global $woo_options, $post;
$title = '';
if ( is_category() ) {
$title = __('Archive', 'woothemes') . ' | ' . single_cat_title( '', false );
} elseif ( is_day() ) {
$title = __('Archive', 'woothemes') . ' | ' . get_the_time( get_option( 'date_format' ) );
} elseif ( is_month() ) {
$title = __('Archive', 'woothemes') . ' | ' . get_the_time( 'F, Y');
} elseif ( is_year() ) {
$title = __('Archive', 'woothemes') . ' | ' . get_the_time( 'Y' );
} elseif ( is_author() ) {
$title = __('Archive by Author', 'woothemes');
} elseif ( is_tag() ) {
$title = __('Tag Archives', 'woothemes') . ' | ' . single_tag_title( '', false );
} elseif ( is_search() ) {
$title = __('Search Results', 'woothemes');
} elseif ( is_single() && get_post_type( $post->ID ) == "post" ) {
$title = __('Blog', 'woothemes');
} elseif ( is_single() && get_post_type( $post->ID ) == "sensei_message" ) {
$title = get_the_title();
} elseif ( is_single() && get_post_type( $post->ID ) != "post" ) {
$title = ucfirst( get_post_type( $post->ID ) ) . ' | ' . get_the_title();
} elseif ( is_post_type_archive() ) {
$title = __('Archive ', 'woothemes') . ' | ' . post_type_archive_title('', false);
} else {
$title = get_the_title();
}
if ( is_woocommerce_activated() ) {
if ( is_product() || is_shop() || is_product_category() || is_product_tag() || is_post_type_archive( 'product' ) || is_tax( get_object_taxonomies( 'product' ) ) ) $title = __('Shop', 'woothemes');
}
?>
<?php if ( !is_home() ) { ?>
<section id="top-section">
<div class="col-full">
<header>
<h1><?php echo $title; ?></h1>
<?php if ( isset( $woo_options['woo_breadcrumbs_show'] ) && $woo_options['woo_breadcrumbs_show'] == 'true' ) { ?>
<div id="breadcrumbs">
<?php woo_breadcrumbs(); ?>
</div>
<?php } ?>
</header>
</div><!--/.col-full -->
</section><!--/#top-section -->
<?php } ?>
<?php
} // End woo_display_top_section()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment