wordpress 自定义登录界面logo图片和样式以及链接

  • A+
所属分类:Wordpress
//custom login logo && url
function fanly_custom_login_logo() {
    echo '<style type="text/css">
      #login h1 a,.login h1 a { background-image:url('.get_bloginfo('template_directory').'/logo150x72.png) ;
background-size: 150px;
width: 150px;
}
    </style>';
}
add_action('login_head', 'fanly_custom_login_logo');
//customs wp login page's logo && url
function custom_loginlogo_url($url) {
return'/index.php';
}
add_filter( 'login_headerurl', 'custom_loginlogo_url');

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: