Affichage du nom du terme taxonomique Interrogation sur un terme Archives page?

wordpress.stackexchange https://wordpress.stackexchange.com/questions/2749

  •  16-10-2019
  •  | 
  •  

Question

( Note du modérateur: après a été intitulé "titre Taxonomy.php")

Comment puis-je afficher le "Messages classés sous:" title pour la page taxonomy.php? Par exemple, ce code est utilisé dans tag.php:

printf( __( 'Tag Archives: %s', 'twentyten' ), 
   '<span>' . single_tag_title( '', false ) . '</span>' );
Était-ce utile?

La solution

Utilisation:

$tax = $wp_query->get_queried_object();
printf( __( 'Posts classified under: %s', 'textdomain' ), '<span>' . $tax->name . '</span>' );
Licencié sous: CC-BY-SA avec attribution
Non affilié à wordpress.stackexchange
scroll top