使用this WordPress的文档我可以删除默认的WordPress徽标,并使用
function my_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/site-login-logo.png);
height:65px;
width:320px;
background-size: 320px 65px;
background-repeat: no-repeat;
padding-bottom: 30px;
}
</style>
<?php }
add_action( \'login_enqueue_scripts\', \'my_login_logo\' );
WordPress网站的链接,而不是我的网站,仍然存在
<h1><a href="http://wordpress.org/" title="Powered by WordPress">Your Site Name</a></h1>
我想要的更像这样
<h1><a href="http://example.com/" title="<?PHP get_bloginfo( \'name\' ); ?>"><?PHP get_bloginfo( \'name\' ); ?></a></h1>
最合适的回答,由SO网友:Liam Stewart 整理而成
在您的functions.php
//wordpress.org > your link
function wp_305258_login_url() {
return home_url();
}
add_filter( \'login_headerurl\', \'wp_305258_login_url\' );
//alt text to your site name
function wp_305258_login_title() {
return get_option( \'blogname\' );
}
add_filter( \'login_headertitle\', \'wp_305258_login_title\' );