![5762e81c7bfc4ae794d3a0c67f707ce8.png](https://img-blog.csdnimg.cn/img_convert/5762e81c7bfc4ae794d3a0c67f707ce8.png)
酱茄
将以下代码复制到当前wordpress主题的functions.php文件里
WordPress修改登录界面的LOGO方法
// 去登录界面的默认图片
function custom_loginlogo() {
echo '
h1 a {background-image: url('.get_bloginfo('template_directory').'/images/logo.png) !important;background-size: 265px !important;width:265px !important; }
';
}
add_action('login_head', 'custom_loginlogo');
注意:记得在当前主题目录新建:images,然后在目录中添加图片:logo.png
WordPress修改登录界面默认LOGO方法
// 去链接
function custom_loginlogo_url($url) {
return'https://www.jiangqie.com';
}
add_filter( 'login_headerurl', 'custom_loginlogo_url');
function custom_register_url($url) {
return'https://www.jiangqie.com';
}
add_filter( 'login_registerurl', 'custom_register_url');
原文来自:酱茄 https://www.jiangqie.com/jc/5556.html