AgentWP

  • Tutorials
  • Themes
  • Plugins
  • Services
  • Contact

Change The Logo on WordPress Login Page

If you are developing a WordPress website for a client or if you are creating a membership site with WordPress then you may want to change the logo on WordPress login page for branding.

change wordpress login page logo

Its not very difficult to replace the WordPress logo on the login page. Just copy the following code and paste it into functions.php file in your theme’s folder,

add_action('login_head', 'my_custom_login_logo');
function my_custom_login_logo() {
    echo '<style type="text/css">
        h1 a { background-image:url('
.get_bloginfo("template_directory").'/images/agentwp-custom-login-logo.gif) !important; }
    <style>'
;
}

Make sure to change the image path in the code to your own custom logo image.

This will replace the WordPress logo. But the logo will still link to WordPress.org. To change that link (and the title attribute), copy and paste the following code to the functions.php file of your WordPress theme,

function loginpage_custom_link() {
    return 'http://www.agentwp.com';
}
add_filter('login_headerurl','loginpage_custom_link');

function change_title_on_logo() {
    return 'AgentWP | WordPress Developer';
}
add_filter('login_headertitle', 'change_title_on_logo');

This will change the link and title attribute of the logo on WordPress login page. That’s it. Now you have a fully customized and branded WordPress login page.

Get useful WordPress related tricks, tips, tutorials and reviews delivered straight to your inbox.

StudioPress - Premium Wordpress Themes
ElegantThemes - Premium Wordpress Themes

Copyright © 2021 · AGENTWP · All Rights Reserved

Copyright © 2021 · awp on Genesis Framework · WordPress · Log in