LoginSignup
0
3

More than 5 years have passed since last update.

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

Last updated at Posted at 2019-04-11

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' );
?>
0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3