remove prefix on category title

Solutions on MaxInterview for remove prefix on category title by the best coders in the world

showing results for - "remove prefix on category title"
María Fernanda
22 Jul 2016
1function prefix_category_title( $title ) {
2if ( is_category() ) {
3  $title = single_cat_title( '', false );
4 }
5return $title;
6}
7
8add_filter( 'get_the_archive_title', 'prefix_category_title' );
Sarah
15 Sep 2016
1if ( is_category() ) {
2        $title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) );
3    } elseif ( is_tag() ) {
4        $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) );
5    } elseif ( is_author() ) {
6        $title = sprintf( __( 'Autor: %s' ), '<span class="vcard">' . get_the_author() . '</span>' );
7    }
8
9//directory: wp-includes
10//file: general-template.php
11//find function: get_the_archive_title() change: