WordPress自定义后台登录页面logo和url
WordPress自定义后台登录页面logo和url
Function代码
//自定义后台登录页面logo和url
function custom_loginlogo() {
echo '<style type="text/css">
h1 a {background: url('.get_bloginfo('template_directory').'/assets/wp-content/files/logo-m.png) !important;}
</style>';
}
add_action('login_head', 'custom_loginlogo');
function custom_loginlogo_url($url) {
return home_url();
}
add_filter( 'login_headerurl', 'custom_loginlogo_url' );
function custom_login_headertitle(){
return get_bloginfo('name');
}
add_filter('login_headertitle', 'custom_login_headertitle');
THE END
0
二维码