Help us understand the problem. What is going on with this article?

【WordPress・プラグインなし】ログイン画面のWordPressロゴ画像を変更する方法

WordPressにログインするページのWordPressロゴマークはCSSの上書きで別の画像に変更することができます。

スクリーンショット 2019-04-11 23.40.23.png

functions.phpに以下を追加します。
style内の画像urlなどは適宜変更してください。

functions.php
<?php
function theme_login_style() { ?>
    <style>
        body.login div#login h1 a {
            background-image: url('<?php echo get_stylesheet_directory_uri() ?>/assets/images/logo.png');
            background-position: center;
            background-size: contain;
            height: 60px;
            width: auto;
        }
    </style>
<?php }
add_action( 'login_enqueue_scripts', 'theme_login_style' );
?>
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away