更换logo图片方法如下:
1、打开网站后台,在外观下找到模板函数文件functions.php;
2、点击打开函数文件functions.php,在下面插入以下代码:
function custom_loginlogo() {
echo ‘<style type=”text/css”>
h1 a {background-image: url(‘.get_bloginfo(‘template_directory’).’/images/login_logo.png) !important; }
</style>’;
}
add_action(‘login_head’, ‘custom_loginlogo’);
3、在主题文件夹下的images文件夹下上传自己的图片logo2.png,这样就可以了。
更换logo链接方法如下:
// 去链接
function custom_loginlogo_url($url) {
return’https://www.yousiman.com/’; //在此输入你需要链接到的URL地址
}
add_filter( ‘login_headerurl’, ‘custom_loginlogo_url’);
function custom_register_url($url) {
return’https://www.yousiman.com/’; //在此输入你需要链接到的URL地址
}
add_filter( ‘login_registerurl’, ‘custom_register_url’);