• I tried to remove page title as this ‘– WordPress’ from admin login with this code in functions.php:

    function custom_login_title( $login_title ) {
    return str_replace(array( ' ‹', ' — WordPress'), array( ' ‹', ''),$login_title );
    }
    add_filter( 'login_title', 'custom_login_title' );

    It doesn’t works. Any know how to code for remove page title?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Maybe you’re not trying to get rid of all your page titles; what if you just want to hide all the page (but not post) titles on your site? In that case, all you need to do is slightly tweak the above CSS code. Just add “.page” in front of the code. For instance:

    Hey, kozley, this code snippet should adjust the title to remove the mention to WordPress:

    function custom_login_title( $title ) {
    	return str_replace( " — WordPress", "", $title );
    }
    add_filter( 'login_title', 'custom_login_title' );

    As you can see in this image below, I was able to remove the mention to WordPress on my login page:

    Thread Starter Kozley

    (@kozley)

    Thank you @plantprogrammer for code snippet. The title isn’t removed.

    • This reply was modified 5 years, 4 months ago by Kozley.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove page title ‘WordPress’’ is closed to new replies.