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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The issue is with the first add_action function call.
If a function named my_login_logo does not exist in your code, adding an action that would call it will result in the warning or an error.
Looking at the WordPress docs:
https://codex.wordpress.org/Customizing_the_Login_Form
You should use:
function my_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_enqueue_scripts', 'my_login_logo' )
There are a few other examples as well, which includes changing links, further styling, etc.
It shouldn’t, no, though ultimately the only way to tell if something is impacting performance is to use a monitor or conduct performance metric testing. If you’re not currently seeing higher levels of traffic, it will be a little harder to do that since with low levels of traffic (or no traffic), you can’t really tell unless it is something major.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.