Search code examples
phpwordpresswordpress-theming

Remove 'Wordpress' from tab title in error page


I need to remove 'Wordpress' title from the error page tab as shown in the screenshot,

1

I tried the below code, it worked with all admin pages except the error pages

add_filter('admin_title', 'my_admin_title', 10, 2);
function my_admin_title($admin_title, $title)
{
   return get_bloginfo('name').' • '.$title;
}
function custom_login_title( $login_title ) {
   return str_replace(array( ' ‹', ' — WordPress'), array( '
   •', ' -New Name’),$login_title );
}
add_filter( 'login_title', 'custom_login_title' );

Solution

  • It's coming from wp-include/function.php, so you need to overwrite this at line number 3121 ()