请在后台主题 模板函数 (functions.php) 模板文件的第一行的
<?php
之后插入以下代码:
[rihide]请复制以下代码到第一行的 <?php 字符的下一行:
[/rihide]//自定义登录页面的LOGO图片
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’);
//自定义登录界面LOGO链接为任意链接
function custom_loginlogo_url($url) {
return ‘https://www.drumv.com’; //修改URL地址
}
add_filter( ‘login_headerurl’, ‘custom_loginlogo_url’ );
//自定义登录页面LOGO提示为任意文本
function custom_loginlogo_desc($url) {
return ‘DrumV.com 鼓谱工厂’; //修改文本信息
}
add_filter( ‘login_headertitle’, ‘custom_loginlogo_desc’ );
//在登录框添加额外的信息
function custom_login_message() {
echo ‘<p>欢迎来到’.get_bloginfo(‘name’).’,请登录后下载本站资源。如不想登录,请返回后重新进入链接,支持无登录状态下载。客服微信/QQ:19713717</p><br />’;
}
add_action(‘login_form’, ‘custom_login_message’);
//自定义底部信息
function custom_html() {
echo ‘<p style=”text-align:center”>Copyright © 2012-Now 鼓谱工厂网 – All rights reserved ‘ . get_bloginfo(url).'</p>’;
}
add_action(‘login_footer’, ‘custom_html’);
0 条评论