wordpress注册页面的logo ,用自定义网站的logo

function custom_login_logo_and_url() {
    ?>
    <style type="text/css">
        #login h1 a {
            background-image: url('https://你的域名.com/logo.png') !important;
            height: 80px;
            width: 100%;
            background-size: contain;
            background-repeat: no-repeat;
        }
    </style>
    <?php
}
add_action('login_enqueue_scripts', 'custom_login_logo_and_url');

// 修改 Logo 点击链接
function custom_login_logo_url() {
    return home_url(); // 跳转到你的网站首页
}
add_filter('login_headerurl', 'custom_login_logo_url');

// (可选)修改鼠标悬停提示文字
function custom_login_logo_title() {
    return get_bloginfo('name');
}
add_filter('login_headertext', 'custom_login_logo_title');

 

阅读剩余
THE END