404 Page header says Untitled

The page-title-section on the 404 page just says Untitled. How can I get it to say 404: Page Not Found?
I thought perhaps it was a Yoast thing, but Yoast only has the customization for the breadcrumbs, I’m not seeing an option for the page title.

Hi,

If you’re using Yoast then the page titles are handled by Yoast only. Go to SEO -> Titles & Metas -> Archives -> Special Page and change the 404 title page,

Full Size Screenshot Link: http://take.ms/6lhTe

Let us know,

Thanks,
laranz.

That just changes the text in the <title></title> tag.

The page-title-section still reads Untitled.

Hi,

You can create a child theme, Child Themes « WordPress Codex and after that add this below line in the functions.php last line, it will change the page title in the 404 pages, you can customize the text “404 No found” to your needs. :slight_smile:

add_filter( 'the_title', 'shapely_404_title' );
function shapely_404_title( $title ) {
	if( is_404() ){
		return esc_html__( '404 Not found.', 'shapely' );
	}
}

If you’re struggling with that please let me know, I’ll create a child theme for you. ?

PS: If you don’t want to get your hands dirty on the code, then simply use this plugin Loco Translate – WordPress plugin | WordPress.org and find that Untitled word and change the text to something like 404 not found, and that will do the trick too.

Let us know,

Thanks,
laranz.

I added that code snippet to my child theme’s functions.php file, but it changed ALL the page titles to Untitled. Navigation, blog post titles, breadcrumbs, everything. Except the 404 page. That worked, but it borked everything else in the process.