Home    Articles

 

Wordpress get term title on taxonomy term page

 

If you want to get "term title" to use it on your theme or anywhere else on any taxonomy term page use this:

echo  single_term_title( '', false ));

If you want to know more, have a look here: get_the_archive_title() and check these lines:

} elseif ( is_tax() ) {
        $tax = get_taxonomy( get_queried_object()->taxonomy );
        /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */
        $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) );
} else {

 

by