Change WordPress admin and login page logo


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function my_custom_login_logo() {
  2. echo '<style type="text/css">
  3. h1 a { background-image:url('.get_bloginfo('template_url').'/images/login_page_logo.png) !important; }
  4. </style>';
  5. }
  6.  
  7. add_action('login_head', 'my_custom_login_logo');
  8.  
  9.  
  10. To change the WordPress Admin area logo (the one which located in the top left side of your Admin panel) then simply add following code to your theme’s functions.php file. Again, Don’t forget to change the logo location in line 3.
  11.  
  12. function custom_logo() {
  13. echo '<style type="text/css">
  14. #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/admin_page_logo.png) !important; }
  15. </style>';
  16. }
  17.  
  18. add_action('admin_head', 'custom_logo');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.