Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo str_replace( ' @' . ICL_LANGUAGE_CODE, '', get_queried_object()->name ) /* questo perché WPML aggiunge un suffisso se le tassonomie hanno lo stesso nome tra una lingua e l'altra */
- ?>
- <?php
- /*
- * WPML aggiunge un suffisso al nome della tassonomia se esiste già un'altra tassonomia con lo stesso NOME,
- * questo filtro elimina nel front-end il prefisso
- *
- * IMPORTANTE: Il nuovo titolo deve essere definito prima che ne venga fatto il return
- */
- add_filter('wp_title', 'wp_title_custom', 10, 1);
- function wp_title_custom($title) {
- $newTitle = str_replace(' @' . ICL_LANGUAGE_CODE, '', $title);
- return $newTitle;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement