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でパンくずナビゲーションのリンクを表示する方法を紹介します。

How to display breadcrumbs navigation in WordPress

パンくずリストナビゲーションとは?

パンくずリストは、リンクの軌跡として表示される階層ナビゲーションメニューを表すキーワードです。ユーザーがサイトのページ階層を上がっていくためのセカンダリー・ナビゲーションとして使用されることが多い。

Navigational links preview in WPBeginner

パンくずリストはWordPressの初期設定のナビゲーションメニューシステムとは異なります。

パンくずナビゲーションの目的は、ユーザーがサイト内を移動できるようにすることです。また、検索エンジンがウェブページ上のリンクの構造や階層を理解するのにも役立ちます。

パンくずリストが正しく設定されていれば、Googleなどの検索エンジンは検索結果でページタイトルとともにパンくずリストを表示します。これにより、検索結果であなたのサイトがより見やすくなり、クリック率も上がります。

Breadcrumb navigation links in search results

このガイドの方法は、スキーママークアップを使ってパンくずリストを適切に設定するのに役立ちます。スキーマとは、Googleがパンくずリストを識別し、検索結果に表示されるようにするためのスマートなマークアップコードです。

それでは、WordPressでパンくずナビゲーションのリンクを追加する方法を見ていきましょう。ここでは2つの方法を紹介するので、自分に合った方法を選んでほしい:

動画チュートリアル

Subscribe to WPBeginner

もし、文章での説明がお望みなら、このまま読み進めてほしい。

この方法は簡単で、すべてのWordPressユーザーにお勧めします。

この方法では、市場で最高のWordPress SEOプラグインであるAll In One SEO for WordPressを使用します。技術的なスキルがなくても、WordPressのSEOを簡単に改善することができます。また、使いやすいパンくずリスト機能も付いている。

All In One SEOの無料版もあり、パンくずリストを含む限られた機能しか利用できない。しかし、リンクアシスタント、アドバンスドサイトマップなどのプレミアム機能にアクセスするには、有料プラグインにアップグレードすることをお勧めします。

有効化すると、プラグインのセットアップウィザードが表示されます。画面の指示に従ってプラグインを設定してください。

All in One SEO setup

セットアップにヘルプが必要ですか?All In One SEOのインストールと設定方法については、ステップバイステップのチュートリアルをご覧ください。

次に、All In One SEO ” 一般設定ページにアクセスし、「パンくずリスト」タブに切り替える必要があります。

Enable breadcrumbs in AIOSEO

パンくずリストスキーママークアップは、All In One SEOによって自動的にサイトのコードに追加されるため、検索エンジンに見つけてもらうことができます。

ただし、サイト上にパンくずナビゲーションリンクも表示したい場合は、「パンくずリストを有効化」オプションをオンにする必要があります。

トグルを切り替えると、WordPressサイトで使用できるさまざまなパンくず表示設定を見ることができます。

Show breadcrumbs on website options

WordPressサイトでパンくずナビゲーションを表示するには、4つの方法があります。

1.ショートコードを使ってパンくずリストをナビゲーションに追加する

ショートコードを使う方法は簡単で、WordPressの投稿日やページ、オンラインストアの商品ページにパンくずリストナビゲーションリンクを表示することができます。

投稿、ページ、商品を編集し、パンくずナビゲーションを表示したい場所に以下のショートコードを追加するだけです:

[aioseo_breadcrumbs]

初期設定のブロックエディターを使用している場合、ショートコードは自動的にショートコードブロックに変換されます。

Add shortcode for breadcrumbs

投稿やページを保存し、プレビューしてパンくずリストナビゲーションメニューの動作を確認できるようになりました。

これがテストサイトでの様子だ。

Preview of shortcode breadcrumbs navigational links

2.Gutenbergブロックを使ったパンくずナビゲーションの追加

ショートコードのオプションを使いたくない場合、またはショートコードを覚えていない場合は、AIOSEO – パンくずリストを使用してパンくずナビゲーションを表示することができます。

パンくずナビゲーションを表示させたい投稿やページを編集し、AIOSEO – パンくずリストを追加するだけです。

AIOSEO breadcrumbs block

プラグインはパンくずリストのナビゲーションリンクのライブプレビューを読み込み、コンテンツエリアに表示します。

更新または変更を公開することを忘れないでください。

AIOSEO breadcrumbs block preview

3.ウィジェットを使ったパンくずリストのナビゲーション追加

上記の2つの方法では、パンくずナビゲーションのリンクを表示したい投稿やページごとにショートコードやブロックを追加する必要があります。

投稿やページごとにパンくずリストを自動的に表示したい場合はどうすればいいでしょうか?

AIOSEOパンくずリストウィジェットを使えば、それが簡単にできます。

外観 ” ウィジェットページに行き、AIOSEO – パンくずリストウィジェットブロックを追加するだけです。サイトのサイドバー、フッター、ウィジェットエリアに追加できます。

Add AIOSEO breadcrumbs to widget

ウィジェットのタイトルをプロバイダーすることも、空白のままにすることもできます。

更新』ボタンをクリックして設定を保存することをお忘れなく。

Enter breadcrumbs widget title

あなたのサイトにアクセスすると、すべての投稿日とページにパンくずリストナビゲーションメニューが表示されます。

4.コードを使ったパンくずリストナビゲーションの追加

この方法を使うと、パンくずナビゲーションのリンクを好きな場所に正確に表示することができます。ただし、WordPressテーマファイルにコードを追加する必要があります。

まだやったことがない場合は、WordPressでコード・スニペットを追加する方法の投稿をご覧ください。

まず、パンくずリンクを表示する場所を決めます。パンくずリンクを表示する最も一般的な場所は、個々の投稿、ページ、または商品タイトルの下です。

WordPressテーマは、サイトのさまざまなセクションを表示するためにテンプレートファイルを使用します。例えば、多くのテーマでは、テーマのtemplate-partsフォルダ内にあるcontent-single.phpというファイルを使用します。

WordPressテーマで編集するファイルについては、チートシートをご覧ください。

その後、FTPクライアントを使用してテーマファイルを編集する必要があります。FTPを使用してWordPressにファイルをアップロードする方法については、こちらのガイドを参照してください。次に、パンくずリストナビゲーションリンクを表示したい場所に以下のコードを記述します:

<?php if( function_exists( 'aioseo_breadcrumbs' ) ) aioseo_breadcrumbs(); ?>

変更を保存し、ファイルをサイトにアップロードすることをお忘れなく。

あなたのサイトでパンくずリンクの動作を確認できます。

Preview of  breadcrumbs navigational links

初期設定では、All In One SEOはパンくずリストナビゲーションリンクを表示するテンプレートを使用します。このテンプレートには、ホーム、カテゴリー、親ページ、投稿またはページタイトルへのリンクが” “記号で区切られて表示されます。

All In One SEO ” 一般設定ページにアクセスし、’パンくずリスト’タブに向かうことで変更できます。次に、パンくずリスト設定セクションまでスクロールダウンします。

AIOSEO breadcrumbs settings

ここから区切りの変更、ホームリンクの表示・非表示、プレフィックスの追加などができる。

終了したら、設定を保存することをお忘れなく。

方法2:パンくずNavXTでパンくずナビゲーションを追加する

この方法は、他のWordPress SEOプラグインでも使用できる。互換性のあるテーマがあれば簡単に使えますが、そうでない場合は、パンくずナビゲーションリンクを表示するためにテーマファイルを編集する必要があります。

最初に必要なことは、パンくずリストNavXTプラグインをインストールして有効化することです。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化した後、Settings ” Breadcrumb NavXTページでプラグイン設定を行う必要があります。

Breadcrumbs NavXT settings

初期設定はほとんどのサイトで機能するはずです。しかし、必要に応じて設定をカスタマイズすることができます。

設定ページは様々なセクションに区切られています。一般設定タブでは、パンくずリストのスタイルと設定を変更することができます。

また、これらのリンクテンプレートは、リンクタグにSchema.orgマークアップを使用していることに気づくだろう。

プラグイン設定の投稿タイプタブでは、投稿、ページ、カスタム投稿タイプのパンくずリンクを設定することができます。

Post types breadcrumbs settings

投稿階層の表示方法を選択できます。初期設定では、プラグインは「サイトタイトル > カテゴリー > 投稿タイトル」の階層を使用します。

カテゴリーをタグ、日付、投稿の親に置き換えたり、区切りを変更することができます。

Choose post hierarchy

タクソノミーとその他タブには、パンくずナビゲーションリンク用の同様のテンプレートがあります。

変更が終わったら保存することをお忘れなく。

パンくずリストNavXTは、サイトにパンくずナビゲーションリンクを表示する複数の方法を提供します。

1.パンくずリストナビゲーションをテーマサポートで表示する

最も人気のあるWordPressテーマのいくつかは、ソースとしてパンくずNavXTまたはWordPress SEOプラグインを選択することにより、パンくずナビゲーションを表示するビルトインオプションが付属しています。

例えば、Astraを使用している場合、外観 ” カスタマイズページに行き、「パンくずリスト」メニューをクリックします。

そこから、「ヘッダーの位置」ドロップダウンでパンくずリストを表示する場所を選びます。

パンくずソース」で、「パンくずNavXT」を選択する必要があります。

Adding breadcrumbs with theme customizer

個別投稿やページを表示している場合、パンくずリストナビゲーションリンクのライブプレビューが表示されます。

公開する」ボタンをクリックして変更を保存することを忘れないでください。

2.パンくずリストブロックによるナビゲーションリンクの表示

パンくずリストブロックを使って、パンくずナビゲーションリンクを表示することもできます。

WordPressのコンテンツエディターにアクセスし、パンくずリストブロックをナビゲーションリンクを表示したい場所に追加するだけです。

Add breadcrumb trail block

次に、コンテンツを更新または公開します。

その後、あなたのサイトを訪問し、ナビゲーション・リンクの動作を確認してください。

Breadcrumb trail preview

3.ウィジェットを使ったパンくずリストのナビゲーション追加

プラグインは、サイドバーやウィジェット対応エリアにパンくずナビゲーションを表示するためのウィジェットも提供します。

まず、外観 ” ウィジェットページに行き、サイドバーやフッターなどのサイトのウィジェットエリアに「パンくずリスト」ウィジェットブロックを追加する。

Add breadcrumb trail widget

初期設定のウィジェットは、ほとんどのサイトで使用できますが、必要に応じて変更することができます。例えば、トップページの軌跡を非表示にしたいかもしれません。

更新」ボタンをクリックして、ウィジェットの設定を保存することを忘れないでください。

4.コードを使ったパンくずリストのナビゲーションの追加

このプラグインは、上級ユーザー向けにパンくずリストナビゲーションリンクを表示するコードメソッドも提供しています。

まず、FTPクライアントを使用してWordPressサイトに接続する必要があります。その後、/wp-content/themes/ディレクトリ内にある現在のWordPressテーマフォルダーに移動します。

WordPressテーマは、サイトのさまざまなセクションを表示するためにテンプレートファイルを使用します。例えば、多くのテーマでは、テーマのtemplate-partsフォルダ内にあるcontent-single.phpというファイルを使用します。

WordPressテーマで編集するファイルについては、チートシートをご覧ください。

テンプレートファイルを開いて編集し、パンくずリストを表示したい場所に以下のコードを記述します:

<?php if( function_exists( 'bcn_display' ) ) bcn_display(); ?>

変更を保存し、ファイルをサイトにアップロードすることをお忘れなく。

あなたのサイトでパンくずリンクのトレイルを実際に見ることができます。

Breadcrumb trail preview

この投稿が、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

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

  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. Dayo Olobayo says

    Thanks for this informative article. I added the aioseo breadcrumbs widget and it automatically shows breadcrumbs for my blog posts. However, I notice it displays breadcrumbs on the home page which I don’t like. Is there a way to fix that please?

    Also, I notice from the screenshot above that your breadcrumbs looks appealing compared to what I have on my blog. Is there a way to customize it?

    PS: I use the aioseo lite plugin.

    • WPBeginner Support says

      It would depend on what method you used to add breadcrumbs to your site for how to remove it from the homepage specifically. For our breadcrums those are currently something we have styled specifically with our theme.

      管理者

      • Dayo Olobayo says

        About the breadcrumbs showing up on my homepage, I contacted aioseo support and they provided me with a CSS code that fixed the problem. Thanks for your response.

  3. Steven Jæger says

    I have tried different breadcrumbs variants now also the NavXT. The breadcrumb show up and all looks fine.

    My main menu are based on pages. My articles are made as posts, I add them in categories. It’s when I visit an article and try to use a link in the breadcrumb to go back one step it goes wrong.

    • WPBeginner Support says

      You may want to resave your permalinks to ensure there wasn’t a hiccup there, otherwise, you would need to reach out to the support for the plugin you are currently using for the support to take a look.

      管理者

  4. Elizabeth Morgan says

    I am using the Breadcrumb NavXT plugin and I added the code you suggested to my header.php file and it gave me this error:

    “Your PHP code changes were rolled back due to an error on line 68 of file wp-content/themes/generatepress/header.php. Please fix and try saving again.

    syntax error, unexpected ‘<', expecting end of file"

    What do I do about this?

  5. Andres says

    Hi WPBeginner,

    Amazing post.

    I wonder the following.

    How do you make the “home” breadcrumb (in your case WPBEGINNER) appear in blogs and posts but not in your HOME page.

    I mean, when you go “home” I dont see the breadcrumb, but when I click on other page I see the breadcrumb.

    Thanks a lot for your time.

  6. Manish Ransubhe says

    Hello, I am not using any plugin and I have never enabled Breadcrumbs.

    Why my search Result showing breadcrumbs help me to disable this

    Thank you

    • Ravi Singh says

      same problem happened with me. So I check my theme panel and my theme had enabled breadcrumbs. you can also check your theme panel for more info about this. and I was using Newspaper theme. So if you are also using this theme then it is the one who is create difficulties for you. Disable it from there.

  7. Dua Centre says

    I have used seo yoast plugin. Breadcrumbs are being displayed on my webpages but not google search results . When will they start displaying in google search result as well ?

  8. Walter says

    Hello! Do you know if is it possible to insert the breadcrumbs inside the menu? I have to design a website with a vertical side menu, and the customer wants to have the breadcrumbs at the bottom of the menu.

  9. Sameer says

    Hello,

    I’m using breadcrumbs using the Yoast SEO method, But it’s only showing on homepage it’s not showing in Google Search.

    Ex : the ideal structure should be Domain.com>Category but it’s showing as Domain.com/Category. can you please tell me how to implement this ?

  10. Joshua says

    Hello.. I am using breadcrumb navxt and its widget is working. I inserted the code for the header.php using “insert header and footer” plugin but I can’t see any changes to my site even after saving and refreshing it.

    Pls help, because the widgets area is working but no breadcrumb is showing in my sites header.

  11. juan luis says

    Hi. I’m afraid to manipulate codes. In case something goes wrong, can I just delete the inserted code without consequences?

  12. Nate Balcom says

    By the way I’m using the Yoast code that you have above and it doesn’t display the correct hierarchy. It omits a link for categories, projects, galleries. Anything that isn’t a post basically gets handled the same way. It’s close, but not correct.

  13. Nate Balcom says

    Thanks for posting this. I’ve been looking for a way to properly display my breadcrumb trail for the spiders. It gets a bit jenky with categories, projects, galleries and the like. I’ve been hand coding mine, but the php handles the hierarchy in the incorrect order. This is a huge help.

  14. Anna says

    My child theme (GeneratePress, from their own child theme download) doesn’t have a header.php file.

    I’ve added the code into the parent GP theme header.php and the breadcrumbs are working now. But when I update GP …?

  15. Abiodun says

    I followed the steps, didn’t really work for me with the posts. I just saw the ‘Home Breadcrumbs’on my homepage. How do I make it appear for my posts please? I’m using Yoast SEO

      • Abiodun says

        It worked…but the category do not appear before my posts, I just get Home>>posts title. How do I make categories appear before posts?

        • Michelle says

          Hey! You have to set a parent page for your page that you are publishing. mine was only showing home > current page until i set the current page as ‘child’ of the articles page, and the articles page as ‘child’ of the homepage. you can do it in the page editor.

返信を残す

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