Posted By

chrisaiv on 08/17/14


Tagged

login wordpress


Versions (?)

Wordpress: Custom wp-login.php through functions.php


 / Published in: PHP
 

URL: https://ethitter.com/2010/11/replacing-wordpress-logo-on-wp-login-php/

Simply paste the following snippet of code into your theme’s functions.php file and adjust the CSS on line 4 as needed.

  1. /** ******** ******** ******** ******** ******** ******** ******** ********
  2. * TITLE: Beautify the Log-in Page
  3. * DESCRIPTION: Make the Log-in Page PRetty
  4. * 1: Change out Logo
  5. * 2: Change out URL
  6. * 3: Change out Title
  7. *
  8. * http://codex.wordpress.org/Customizing_the_Login_Form
  9. */
  10. function my_login_logo() { ?>
  11. <style type="text/css">
  12. body.login div#login h1 a {
  13. background-image: url(/wp-content/uploads/2014/07/logo-80x80.png);
  14. background-size: 80x 80px;
  15. }
  16. </style>
  17. <?php }
  18. add_action( 'login_enqueue_scripts', 'my_login_logo' );
  19.  
  20. function my_login_logo_url() {
  21. return home_url();
  22. }
  23. add_filter( 'login_headerurl', 'my_login_logo_url' );
  24.  
  25. function my_login_logo_url_title() {
  26. return 'GuitarPick';
  27. }
  28. add_filter( 'login_headertitle', 'my_login_logo_url_title' );
  29.  
  30. function no_errors_please(){
  31. return 'Please Try Again';
  32. }
  33. add_filter( 'login_errors', 'no_errors_please' );

Report this snippet  

You need to login to post a comment.