{"id":1439,"date":"2010-05-10T22:49:11","date_gmt":"2010-05-10T12:49:11","guid":{"rendered":"https:\/\/eisabainyo.net\/weblog\/?p=1439"},"modified":"2010-05-12T12:02:01","modified_gmt":"2010-05-12T02:02:01","slug":"how-to-customise-wordpress-admin-login-page","status":"publish","type":"post","link":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/","title":{"rendered":"How to customise WordPress Admin Login page"},"content":{"rendered":"<p>Here is a step-by-step tutorial on how to customise WordPress Login page for your website\/blog.  This tutorial will show you how to change the WordPress logo and link on the Login page without hacking the core code nor installing a plugin.  <\/p>\n<p>1.  Copy and paste the following code into functions.php file of your current theme.  If there is no functions.php in your current theme folder, create one.  <\/p>\n<pre>\r\n&lt;?php\r\nfunction custom_header() { \r\n    echo '&lt;link rel=&quot;stylesheet&quot; type=&quot;text\/css&quot; href=&quot;' . get_bloginfo('template_directory') . '\/admin\/login.css&quot; \/&gt;'; \r\n    echo '&lt;script src=&quot;http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.3.2\/jquery.min.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;';\r\n    echo '&lt;script type=&quot;text\/javascript&quot; src=&quot;' . get_bloginfo('template_directory') . '\/admin\/login.js&quot;&gt;&lt;\/script&gt;';\r\n}\r\nadd_action('login_head', 'custom_header');\r\n?&gt;\r\n<\/pre>\n<p>2. Create a folder called admin in your current theme folder.  This is where you will put all your css, js and images for the custom Login page.  I like to create a separate folder for admin css and images because it keeps things neat and clean.  <\/p>\n<p>3.  Create a css file and name it login.css.  You can give it any name you wish but remember to change it accordingly in custom_header() function in functions.php file of your current WordPress theme.  In this css file, you will be putting CSS overrides for the WordPress login page.  Mine looks like this: <\/p>\n<pre>\r\n#login h1 a {\r\n\tbackground: transparent url(images\/logo.gif) no-repeat scroll 0 0;\r\n\tdisplay: block;\r\n\theight: 66px;\r\n\ttext-indent: -5000em;\r\n\twidth: 386px;\r\n}\r\n\r\n#login {\r\n\twidth: 368px;\r\n}\r\n<\/pre>\n<p>The above code simply replaces the WordPress logo above the Login box with the custom logo I have in images folder and makes the width of the login box a bit wider.   You can do many other things from this CSS file to customise your WordPress login page; for example, changing the background image, changing the text styles, changing the look and feel of buttons, etc.  <\/p>\n<p>4. Create a javascript file called login.js in admin folder of the current WordPress theme that you have created earlier.   As with the css file, you can name it any thing you like, just as long as it matches the one used in custom_header() function.   And because I have also included jQuery library from <a href=\"http:\/\/code.google.com\/apis\/ajaxlibs\/\">Google AJAX Libraries API<\/a>, I can use jQuery methods to overwrite any event or perform new actions via login.js javascript.  My login.js file looks like below: <\/p>\n<pre>\r\n$(document).ready(function(){ \r\n\t$(\"#login h1 a\").attr(\"href\", \"\/\");\r\n}); \r\n<\/pre>\n<p>The above code replaces the href attribute of the logo link via DOM.  So rather than going to the WordPress website when someone clicks on the logo on Login page, it will go to the website's homepage. <\/p>\n<p>So, that's it.  4 simple steps to customising your WordPress Admin Login page.   If you are using WordPress as a CMS, it is a good idea to customise the Admin Login page to ensure that you get a similar user experience and look and feel for both the front end of the website and the backend.    For your inspiration, have a look at this Flickr Group Pool featuring a collection of <a href=\"http:\/\/www.flickr.com\/groups\/bm-custom-login\/pool\/\">Custom WordPress Logins<\/a>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a step-by-step tutorial on how to customise WordPress Login page for your website\/blog.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,11,4],"tags":[],"class_list":["post-1439","post","type-post","status-publish","format-standard","hentry","category-php","category-tutorials","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to customise WordPress Admin Login page | Tech Leadership Advice &amp; Resources<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to customise WordPress Admin Login page | Tech Leadership Advice &amp; Resources\" \/>\n<meta property=\"og:description\" content=\"Here is a step-by-step tutorial on how to customise WordPress Login page for your website\/blog.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Leadership Advice &amp; Resources\" \/>\n<meta property=\"article:published_time\" content=\"2010-05-10T12:49:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2010-05-12T02:02:01+00:00\" \/>\n<meta name=\"author\" content=\"Isabel Nyo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Isabel Nyo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/\"},\"author\":{\"name\":\"Isabel Nyo\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"headline\":\"How to customise WordPress Admin Login page\",\"datePublished\":\"2010-05-10T12:49:11+00:00\",\"dateModified\":\"2010-05-12T02:02:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/\"},\"wordCount\":438,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"articleSection\":[\"PHP\",\"Tutorials\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/\",\"name\":\"How to customise WordPress Admin Login page | Tech Leadership Advice &amp; Resources\",\"isPartOf\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#website\"},\"datePublished\":\"2010-05-10T12:49:11+00:00\",\"dateModified\":\"2010-05-12T02:02:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eisabainyo.net\/weblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to customise WordPress Admin Login page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#website\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/\",\"name\":\"Career Resources for Professionals in Tech\",\"description\":\"Books, worksheets, templates, frameworks and other useful resources for Chief Technology Officers (CTOs), VPs of Engineering &amp; Technology Directors\",\"publisher\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eisabainyo.net\/weblog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\",\"name\":\"Isabel Nyo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g\",\"caption\":\"Isabel Nyo\"},\"logo\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/\"},\"description\":\"My interests: Web Development, Web Design, Web Applications, Web 2.0, AJAX, Search Engine Optimisation, Latest Technologies and more..\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to customise WordPress Admin Login page | Tech Leadership Advice &amp; Resources","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/","og_locale":"en_US","og_type":"article","og_title":"How to customise WordPress Admin Login page | Tech Leadership Advice &amp; Resources","og_description":"Here is a step-by-step tutorial on how to customise WordPress Login page for your website\/blog.","og_url":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/","og_site_name":"Tech Leadership Advice &amp; Resources","article_published_time":"2010-05-10T12:49:11+00:00","article_modified_time":"2010-05-12T02:02:01+00:00","author":"Isabel Nyo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Isabel Nyo","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/#article","isPartOf":{"@id":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/"},"author":{"name":"Isabel Nyo","@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"headline":"How to customise WordPress Admin Login page","datePublished":"2010-05-10T12:49:11+00:00","dateModified":"2010-05-12T02:02:01+00:00","mainEntityOfPage":{"@id":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/"},"wordCount":438,"commentCount":3,"publisher":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"articleSection":["PHP","Tutorials","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/","url":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/","name":"How to customise WordPress Admin Login page | Tech Leadership Advice &amp; Resources","isPartOf":{"@id":"https:\/\/eisabainyo.net\/weblog\/#website"},"datePublished":"2010-05-10T12:49:11+00:00","dateModified":"2010-05-12T02:02:01+00:00","breadcrumb":{"@id":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/eisabainyo.net\/weblog\/2010\/05\/10\/how-to-customise-wordpress-admin-login-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eisabainyo.net\/weblog\/"},{"@type":"ListItem","position":2,"name":"How to customise WordPress Admin Login page"}]},{"@type":"WebSite","@id":"https:\/\/eisabainyo.net\/weblog\/#website","url":"https:\/\/eisabainyo.net\/weblog\/","name":"Career Resources for Professionals in Tech","description":"Books, worksheets, templates, frameworks and other useful resources for Chief Technology Officers (CTOs), VPs of Engineering &amp; Technology Directors","publisher":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eisabainyo.net\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab","name":"Isabel Nyo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g","caption":"Isabel Nyo"},"logo":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/"},"description":"My interests: Web Development, Web Design, Web Applications, Web 2.0, AJAX, Search Engine Optimisation, Latest Technologies and more.."}]}},"_links":{"self":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/1439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/comments?post=1439"}],"version-history":[{"count":9,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/1439\/revisions"}],"predecessor-version":[{"id":1448,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/1439\/revisions\/1448"}],"wp:attachment":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/media?parent=1439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/categories?post=1439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/tags?post=1439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}