If you want to customize the logo and background image of the WordPress login page, you can find many code modification methods online. However, the code method is quite troublesome for novice users, and you have to redo it every time you change the theme. Therefore, here is a very clean WordPress plugin for modifying the WordPress login page logo and background image
WordPress Plugin: Custom WP Admin Login
Plugin Introduction
Custom WP Admin Login is a simple method to change the WordPress admin login background. The Custom WP Admin Login plugin allows you to customize your WordPress admin login page. The plugin enables changing the background color, background image, custom logo, and logo title text. The Custom WP Admin Login plugin supports the following features:
- Add custom logo
- Add custom logo title text
- Select background color
- Add background image
- Backup background style settings

Plugin Usage and Download
1. Download the plugin, upload and install it, or search for 'Custom WP Admin Login' in the backend and install it. 2. Activate the plugin. 3. In the plugin settings, upload the LOGO and background image and save. 4. Preview the effect on the frontend.
Extension Download Address: Download LinkA More Direct Method
Of course, if you think it's a bit wasteful to use a separate plugin just to modify this logo image address, you can also directly replace the images. Simply replace the two files in your website directory with the ones you want. However, note that you need to replace them again after a WordPress version update.
wp-admin/images/w-logo-blue.png
wp-admin/images/wordpress-logo.svg?ver=20131107
If you want a permanent solution and don't want to use a plugin, then you can only modify it with code.
The code is as follows: /images/custom-logo.pngis the location of the logo image you want to replace, under the images folder in your theme directory. Upload it yourself.
add_action('admin_head', 'my_custom_logo');
function my_custom_logo() {
echo '
<style type="text/css">
#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/custom-logo.png) !important; }
</style>
';
}
Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.