{"id":42294,"date":"2015-01-15T19:49:23","date_gmt":"2015-01-15T14:19:23","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/?p=42294"},"modified":"2022-12-15T22:29:51","modified_gmt":"2022-12-15T16:59:51","slug":"change-wordpress-login-screen-logo-background","status":"publish","type":"post","link":"https:\/\/www.quickonlinetips.com\/archives\/2015\/01\/change-wordpress-login-screen-logo-background\/","title":{"rendered":"How to Customize WordPress Login Page Logo and CSS"},"content":{"rendered":"<p>Did you know you customize the WordPress login screen logo and change background easily with custom CSS. Just as you have a custom WordPress theme and a unique site design, why should you not have a custom WP login page as well.<\/p>\n<h2>Default WordPress Login Page<\/h2>\n<p>By default, the WordPress login screen is same for ALL\u00a0WordPress blogs and is typically located at <em>\/WordPressFolder\/wp-admin\/<\/em>. This is how your boring default login screen typically looks like, and probably you visit it everyday.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42295\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/qot-login-old.png\" alt=\"Old WordPress Login\" width=\"500\" height=\"478\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/qot-login-old.png 500w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/qot-login-old-150x143.png 150w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/qot-login-old-300x287.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Now see how our WP login page looks like. Does it not look better!<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42296\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/qot-login-new.png\" alt=\"Custom WordPress login\" width=\"500\" height=\"446\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/qot-login-new.png 500w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/qot-login-new-150x134.png 150w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/qot-login-new-300x268.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>You notice that we have simply replaced the WordPress logo with our site logo and changed the background color from default light gray to black &#8211; and it makes a huge difference to branding. It immediately wows the visitor and makes them curious about the website.<\/p>\n<h2>Custom WordPress Login Page<\/h2>\n<p>Here is how we do this. We need to paste the following code into the theme <strong><em>functions.php<\/em><\/strong> file. (Note that it is a very powerful file and incorrect code can lead to your site going offline. Always keep a backup of the file, and you can always restore the file back to your WP theme folder vai FTP if anything goes wrong.)<\/p>\n<pre><code>function qot_login() {\r\necho '&lt;style type=\"text\/css\"&gt;\r\n.login h1 a {\r\nbackground-image:url( \"http:\/\/path\/to\/yourlogo.png\" ) !important;\r\nheight: 30px !important; width: 200px !important;\r\nbackground-size: 200px auto !important;\r\n}\r\nbody { \u00a0background: #000;\u00a0}\r\n.login form {\u00a0background: #333;\u00a0}\r\n&lt;\/style&gt;';\r\n}\r\nadd_action('login_head', 'qot_login');<\/code><\/pre>\n<p>What the code simply does is it adds a new inline CSS Stylesheet on the WP login page.<\/p>\n<ol>\n<li>The first line replaces the WP logo with your logo and fixes some dimensions (Remember to change the URL to point to your logo image and remember to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2015\/03\/dispay-sharper-logo-on-high-resolution-screens\/\">sharpen your logo for 4K screens<\/a> as well).<\/li>\n<li>The rest of the CSS changes the background to black (#000), and the login form to dark gray (#333) to contrast it. Add the <code>!important<\/code> CSS code wherever you feel your custom CSS is not overriding the default code. Feel free to experiment with whatever colors look great on your site and match your branding.<\/li>\n<\/ol>\n<p><strong>Do this today<\/strong> &#8211; \u00a0It is excellent for blog branding. Why have default WP logo, when you should have your own logo there. Why look like every other site. If you run a multi site blog network, or require multiple users to login everyday &#8230; why not create this branded login screen and surprise them today. If you want to change logo only, you can access the WP installation and<a href=\"https:\/\/www.quickonlinetips.com\/archives\/2011\/06\/how-to-change-wordpress-login-screen-logo\/\"> edit the WP logo image via FTP<\/a> as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you know you customize the WordPress login screen logo and change background easily with custom CSS. Just as you&#8230;<\/p>\n","protected":false},"author":4,"featured_media":42296,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[6],"tags":[49,17],"class_list":["post-42294","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogging","tag-tutorials","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/42294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=42294"}],"version-history":[{"count":0,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/42294\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media\/42296"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=42294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/categories?post=42294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/tags?post=42294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}