
Image Courtesy of codex.wordpress.org
A you looking to strip your site of the generic WordPress branding and equip it with a look and feel that will add more of a professional website appearance? If you are a WordPress novice, there are several plugins available that will allow you to replace your login logo without any adverse risk. If you are one of those individuals who are hesitant about changing your logo manually, I recommend you check out the Custom Login Plugin located in the WordPress plugin repository.
For all the experienced WordPress users who don’t mind getting your hands dirty, follow the steps below to achieve a custom login page logo and url without the use of a plugin. In order to perform the steps below you will require access to your themes functions.php file. You can edit the file from your webserver control panel or any xml editor. I do not recommend you use notepad.
Warning: Create a back up your functions.php file before making any chances.
- Copy or upload your desired logo.png login logo to your current themes image directory. The location should be… theme/images/logo.png (theme=name of the theme you are using in WordPress. The logo must be a transparent png file and not a jpeg or bitmap image file type.
- To change the login logo, paste the following code in your current themes functions.php file
function my_login_logo() { ?> <style type="text/css"> body.login div#login h1 a { background-image: url(<?php echo get_bloginfo( 'template_directory' ) ?>/images/login-logo.png); padding-bottom: 30px; } </style> <?php } add_action( 'login_enqueue_scripts', 'my_login_logo' );
3. To set the logo url to link to your web site when clicked instead of the defaut WordPress.org, past the following code after the code in step 2
// Use your own web site URL logo link function my_logo_login(){ return "http://nerdynerdnerdz.com/"; //<--replace with your URL here } add_filter( 'login_headerurl', 'my_logo_url' );
Leave a Reply
You must be logged in to post a comment.