Wednesday, May 6, 2015

Wordpress: Wordpress default Logo and Link change by using simple function


In general the login or registration of wordpress site contain wordpress logo and wordpress.org link as below.
But we want to change thous link and logo, is it possible ?
The answer will yes it is possible. By using two simple function we can change this logo and link.
The code as below-

add_action("login_head", "my_login_head");
function my_login_head() {
echo "
<style>
body.login #login h1 a {
background: url('http://yourdomain.com/img/logo.png') no-repeat scroll center top transparent;
height: 119px;
  width: 319px;
}
</style>
";
}
function loginpage_custom_link() {
return 'http://advancetechtutorial.blogspot.com';
}
add_filter('login_headerurl','loginpage_custom_link');
function change_title_on_logo() {
return 'Tech Tutorial';
}
add_filter('login_headertitle', 'change_title_on_logo');
For any question about this topic please write on comment box below. Thanks.  

0 comments :

Post a Comment

 

Copyright @ 2014 Tech Tutorial .