Remove "WordPress" From Admin Page Titles
Shortens browser tab titles in the admin and on the login page by dropping the trailing "— WordPress".
Opens WPIDE on
Code
$wpide_strip_wp_title = function ( $title ) {
return preg_replace( '/\s*(—|—|—)\s*WordPress\s*$/u', '', (string) $title );
};
add_filter( 'admin_title', $wpide_strip_wp_title, 99 );
add_filter( 'login_title', $wpide_strip_wp_title, 99 );
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.