i have try many methods after searching on internet but unable to ramove Nothing Found from my 404 page title
how to do it please help me
even i have us this in my 404 page header
if( is_404() ) echo '404 message goes here | ';
else wp_title( '|', true, 'right' );
i also ramove php title function and five their my own header but still not changing why ?
I would use the
wp_title
filter hook:This will play nicely with other Plugins (e.g. SEO Plugins), and will be relatively forward-compatible (changes to document title are coming soon).
EDIT
If you need to override an SEO Plugin filter, you probably just need to add a lower priority to your
add_filter()
call; e.g. as follows:The default is
10
. Lower numbers execute earlier (e.g. higher priority), and higher numbers execute later (e.g. lower priority). So, assuming your SEO Plugin uses the default priority (i.e.10
), simply use a number that is 11 or higher.WordPress 4.4 and up
The accepted answer no longer works as
wp_title
is deprecated in WordPress 4.4 and up (see here). We must now use the document_title_parts filter hook instead.Here is the accepted answer rewritten to use
document_title_parts
.The following code works fine with the twenty eleven theme:
So the title code looks like the following: