Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressでカスタムダッシュボードロゴを追加する方法

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

WordPressでカスタムのダッシュボードロゴを追加したいですか?

ブランディングのためにWordPressのロゴをダッシュボードのカスタムロゴに置き換えることがよくあります。

この投稿では、WordPressでブランディングのためにカスタムダッシュボードロゴを追加する方法を紹介します。

Custom dashboard logo in WordPress

カスタムダッシュボードロゴとは何か、なぜ追加するのか?

カスタムダッシュボードロゴは、WordPress管理ダッシュボードに独自のカスタムロゴやブランディングで外観を表示します。

些細なことのように思えるかもしれませんが、サイトのブランドにとって重要な要素であり、いくつかの理由から重要なのです:

  • ブランディング:ブランドアイデンティティを強化し、WordPressの管理エリアがあなたのビジネスの一部のように感じられるようにします。
  • プロフェッショナリズム:カスタムのダッシュボードロゴは、WordPressサイトをよりプロフェッショナルで洗練された印象にします。
  • ホワイトラベル: クライアントのためにウェブサイトを構築したり、マルチサイトネットワークを運営している場合、カスタムダッシュボードロゴを使用してWordPress管理エリアをホワイトラベル化することができます。つまり、WordPressのブランディングを完全に削除し、独自のブランディングに置き換えることで、クライアントにカスタマイザー体験を提供することができます。

中小企業であれ、オンラインショップや ブログのオーナーであれ、バックエンドエクスペリエンスをパーソナライズし、強力な社内ブランドアイデンティティを確立するために、カスタマイザーのダッシュボードロゴを持つことは重要です。

方法1:プラグインを使ってWordPressにカスタム・ダッシュボード・ロゴを追加する

この方法は超簡単で、ほとんどの初心者にお勧めできる。

まず最初にWhite Label CMSプラグインをインストールして有効化します。詳しくはWordPressプラグインのインストール方法をご覧ください。

有効化した後、Settings ” White Label CMSページにアクセスする必要があります。

Settings white label CMS

次に、「ブランディング」タブを選択します。

スイッチを左から右に切り替えて、「WordPressロゴとリンクを非表示」にします。

Hide WordPress logo and links

次に、「ダッシュボード」タブを開きます。

ここで、「ダッシュボードアイコン」と書かれているところにカスタムロゴをアップロードします。

Upload custom dashboard logo

カスタマイザーロゴのサイズは40×40ピクセルでお願いします。

右上の「保存」ボタンをクリックし、設定を保存することをお忘れなく。

Save button

WordPressの管理エリアに戻る。

ダッシュボードにロゴが表示されるはずです。こんな感じです:

Custom dashboard logo

カスタムダッシュボードロゴ以外にも、White Label CMSはWordPressインストールをリブランディングするための機能を提供しています。

詳細な手順については、WordPress管理ダッシュボードをホワイトラベル化する方法のガイドをご覧ください。

方法2:WordPressでカスタム・ダッシュボードのロゴを手動で追加する

この方法は、WordPressにコード・スニペットを貼り付けることに慣れているユーザー向けです。WordPressにカスタムコードを追加する最も簡単で安全な方法は、WPCodeのようなプラグインを使用することです。

WordPressサイトにショートコードを追加する方法を教えるほとんどのチュートリアルでは、テーマのfunctions.phpファイルにコードを追加するように書かれています。うまくいくこともありますが、うまくいかないこともたくさんあります。

コードや追加方法に小さなミスがあっただけでも、WordPressサイトが壊れてアクセスできなくなる可能性があります。そのため、上級ユーザーにのみお勧めします。

上級ユーザーであっても、WPCodeが最も安全な方法ですので、まずは無料のWPCodeプラグインをインストールして有効化してください。より詳細な手順については、WordPressプラグインのインストール方法をご覧ください。

次に、カスタムロゴをcustom-logo.pngファイルとしてコンピューターに保存してください。サイズは40 x 40 pxです。

カスタムロゴの準備ができたら、FTPを使って /wp-content/themes/your-theme/imagesフォルダにアップロードする必要があります。あなたのテーマにフォルダーがない場合は、作成する必要があります。

そこから、Code Snippets>> Add Snippetに向かう。

Add snippet

WPCodeライブラリにたどり着き、そこから何十ものコード・スニペットを選ぶことができる。

この場合、「カスタムコードを追加」を選択し、「スニペットを使用」ボタンをクリックします。

Add your custom code in WPCode

カスタムロゴダッシュボード」のようなタイトルを入れてください。

次に「コードタイプ」を「PHPスニペット」に変更する。

Php snippet in WPCode

その後、このコードを「コード・プレビュー」ボックスに追加するだけだ:

function wpb_custom_logo() {
echo '
<style type="text/css">
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
background-image: url(' . get_bloginfo('stylesheet_directory') . '/images/custom-logo.png) !important;
background-position: 0 0;
color:rgba(0, 0, 0, 0);
}
#wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {
background-position: 0 0;
}
</style>
';
}

//hook into the administrative header output
add_action('wp_before_admin_bar_render', 'wpb_custom_logo');

こんな感じだ。

Code preview for manually adding custom dashboard logo

テキストと書式がすべて上とまったく同じであることを確認してください。

挿入方法」までスクロールダウンし、「自動挿入」を選択する。

カスタムロゴがダッシュボードに表示されるようにするには、「場所」ドロップダウンメニューを展開し、「管理者のみ」を選択します。

Admin only

最後に、スイッチをInactiveからActiveに切り替え、「Save」ボタンをクリックする。

このコードは、WordPressの管理バーにカスタムロゴを表示するために必要なCSSを追加するだけです。

Save snippet in WPCode

以上、WordPressでカスタムダッシュボードロゴを追加する方法について、この投稿がお役に立てれば幸いです。また、Adminimizeを使ってWordPressから不要な項目を非表示にする方法についてのガイド、またはあなたのサイトをより良くカスタムするためのWordPressの最高のヒント、トリック、ハックについてのブログ投稿もご覧ください。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

14件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Dennis Muthomi says

    this is why I love WordPress opens source nature,the freedom to change/customize it to my liking
    I really appreciated the clear step-by-step instructions for both the plugin method and manual code. I’ll go with the plugin method…it seems easier
    Great post!

    • WPBeginner Support says

      If you wanted to override a plugin’s logo then you would want to reach out to the support for that specific plugin and they may have an option.

      管理者

  3. mazhar says

    i change the wordpress custom logo with the help of white label CMS plugin but i dont know how to find this code to your theme’s functions.php file or a site-specific plugin. where it is please help me
    thank you

  4. Bjornen says

    Where is the file located?
    I mean, the logo itself must be a png (transparent picture) of the WP-logo, placed somewhere in WP.

    So, would it not be better to just switch that with another file with the same name?

  5. chad says

    This does’nt wok for me. I made the 16×16 png and put it in my themes images folder and pasted the function to my functions.php file.

  6. David Cornish says

    A great article information with some great tips sharing that I will be implementing on my own website as well as clients.

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。