Skip to content

Instantly share code, notes, and snippets.

@RiaanKnoetze
Created August 15, 2016 08:15
Show Gist options
  • Save RiaanKnoetze/6df4d0bfb7094f53bddb2a1a7b7bb2e9 to your computer and use it in GitHub Desktop.
Save RiaanKnoetze/6df4d0bfb7094f53bddb2a1a7b7bb2e9 to your computer and use it in GitHub Desktop.
Remove "Archives" from title when using WooThemes Canvas and the Testimonials by WooThemes plugin
function new_testimonial_title( $new_title ) {
// Make sure we limit this to the Testimonials post type
if ( 'testimonial' == get_post_type() ) {
$post_type_object = get_post_type_object( get_query_var( 'post_type' ) );
$title = $post_type_object->labels->name;
return $title;
}
}
add_filter( 'get_the_archive_title', 'new_testimonial_title' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment