0

I have an issue my friends. when I got to default logn page in wordpress, I see this error:
Notice: login_headertitle is deprecated since version 5.2.0! Use login_headertext instead. Usage of the title attribute on the login logo is not recommended for accessibility reasons. Use the link text instead. in /home/xxxxxxx/public_html/wp-includes/functions.php on line 4711
I am using wp veroin 5.2.1 I do not use any plugin to customize login page. I have searched a lot in my own files but no find login_headertitle. I just use the following codes in functions.php for custom css for login page:

function custom_login_css() {
    wp_enqueue_style( 'mylogincss', get_template_directory_uri() . '/css/custom-login-styles.css' );
    }
add_action('login_head', 'custom_login_css');  

.
so I am confused that why I see that error at the top of login page???
whould you help me to fix it?

0

As the error states, WordPress has deprecated the login_headertitle function. You most likely have a plugin or parent theme that is using this function to change the title on your login page. Check to see if there are any updates to your plugin and theme files.

Seeing this message also indicates that you have debugging enabled on your site. If it's a live site that you are not developing on, you probably want to disable that. Or, you can keep debugging enabled for development and have it log to a file instead of displaying on the screen. Wordpress.org has documentation on debugging.

If you're developing a theme or plugin that is using login_headertitle, it's easy to resolve. If there's an add_action or another function call to login_headertitle, just replace it with login_headertext. Here's an example from the WordPress Code Reference for the login_headertext function:

// Customize login header text.
add_filter( 'login_headertext', 'customize_login_headertext' );

function customize_login_headertext( $headertext ) {
  $headertext = esc_html__( 'Add custom login page text here', 'plugin-textdomain' );
  return $headertext;
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.