Affichage du nom du terme taxonomique Interrogation sur un terme Archives page?
-
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>' );
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