Created
May 17, 2025 12:30
-
-
Save Tiex84/2105baf410dd162167d918069e03968e to your computer and use it in GitHub Desktop.
Rimuovi "archivi" dalle pagine (da inserire in functions.php del tema)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('get_the_archive_title', 'rimuovi_archivi_dai_titoli'); | |
function rimuovi_archivi_dai_titoli($title) { | |
if (is_category()) { | |
$title = single_cat_title('', false); | |
} elseif (is_tag()) { | |
$title = single_tag_title('', false); | |
} elseif (is_tax()) { | |
$title = single_term_title('', false); | |
} elseif (is_post_type_archive()) { | |
$title = post_type_archive_title('', false); | |
} | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment