Created
June 30, 2022 11:47
-
-
Save tdmrhn/16238be077d291e9947ca668086139bf to your computer and use it in GitHub Desktop.
Blocksy Remove WP core archive title prefix
This file contains 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
<?php | |
// remove category: from archives | |
add_filter( 'get_the_archive_title', function ($title) { | |
if ( is_tax() ) { | |
$title = sprintf( __( '%1$s' ), single_term_title( '', false ) ); | |
} | |
return $title; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment