Last active
October 20, 2021 20:24
-
-
Save lelandf/2fdd83764c9f1e4312caeaf7973124bf to your computer and use it in GitHub Desktop.
Override "Untitled" filter in Twenty Twenty-One theme
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
<?php | |
add_filter( 'the_title', function( $title, $id ) { | |
if ( 0 === $id && 'Untitled' === $title ) { | |
$title = ''; | |
} | |
return $title; | |
}, 11, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment