在管理员登录页面上添加自定义徽标和自定义链接
你可以添加以下挂钩添加自己的徽标和链接以替换默认的 wordpress 徽标。
添加自定义徽标
function custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image: url('.get_bloginfo('template_directory').'/images/custom-logo.png) !important; background-size : 100% !important; width: 300px !important; height : 100px !important;}
</style>';
}
add_action('login_head', 'custom_login_logo');
添加自定义徽标链接
add_filter( 'login_headerurl', 'custom_loginlogo_url' );
function custom_loginlogo_url($url) {
return home_url();
}