Question
replacing wordpress login logo
Hello guy’s
i know this is not related to server setup, but i know ill find many expert here who can help me out.
i need to replace the wordpress logo from the wp-login.php
so i added following in my themes function.php
/*** Custom LOGO ***/
add_action( 'login_enqueue_scripts', 'my_login_logo' );
function custom_login_logo() {
echo '<style type="text/css">'.
'h1 a { background-image:url('.get_bloginfo( 'template_directory' ).'/assets/my-logo.png) !important; }'.
'</style>';
}
add_action( 'login_head', 'custom_login_logo' );
it replaces the logo, but whenever i login i get this error massage in my error.log
2017/06/08 17:28:13 [error] 3588#3588: *222 FastCGI sent in stderr: "PHP message: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'my_login_logo' not found or invalid function name in /var/www/mysite/html/wp-includes/class-wp-hook.php on line 298" while reading response header from upstream, client: 103.205.121.545, server: mysite.com, request: "GET /wp-login.php?redirect_to=https%3A%2F%2Fmysite.com%2Fwp-admin%2F&reauth=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "mysite.com"
anyone can guide me here?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×