Reply To: custom page titles for categories

Home Forums Support custom page titles for categories Reply To: custom page titles for categories

#215180
Hans

Hi Tom,

unfortenately I did not succeed with your code. Either I got a syntax error or nothing happend using different hooks. I don’t know what I am making wrong. I use now a modification in template-tags.php at the end of the list of if … elseif which is working fine for me.

elseif ( is_tax() ) :
$tax = get_taxonomy( get_queried_object()->taxonomy );
/* translators: 1: Taxonomy singular name, 2: Current taxonomy term */
printf( __( '%1$s: %2$s', 'genratepress' ), $tax->labels->singular_name, single_term_title( '', false ) ) ;