How to Implement WordPress Breadcrumbs without Plugin – Yoast and Genesis

Breadcrumbs generally provide links to one of the archives you have chosen automatically. These can be your category or tag or date format. You can enable those using Yoast settings.

PHP code is provided to display the breadcrumbs. This needs to be included at the place where you want to show the navigation links.

The following Yoast php breadcrumbs code has to be inserted in the hook element content of Genesis Theme.

<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); } ?>

This is about the review of kk Star Ratings plugin to display star ratings in Google Search results.

When you are on a post, you would like to see the category to which it belongs. This is a simple method to reach the home page from the post. After reading the article, you would like to read similar posts of the same type.

What are Breadcrumbs in WordPress

Breadcrumb navigation are links placed on posts, pages, categories, tags and other archives. By default, WordPress does not provide any setting to include on your site. Yoast SEO plugin provides a way to include this secondary navigation system.

Most people like to display the breadcrumbs at the top of the post or after the post title. In some cases, they would like to include them in the header. All these are possible with the placement code of WordPress.

Related Post :   [Working] How to Remove Website URL Field from Genesis Theme Comment Form
This review talks about WP Review Pro plugin to display author and visitor reviews in Google Search results.

Most PHP code insertion plugins give no choice to include breadcrumbs at the desired spot. Using the hook element of GeneratePress theme, you can place the php code at an appropriate location.

In this tutorial, we are going to see how to display breadcrumbs in WordPress above the post title.

Show Breadcrumbs on WordPress Posts using PHP code

Using Yoast WordPress Breadcrumbs and Genesis elements, you can display the navigation path. Copy the PHP shortcode and paste it in the hook element content box. Select the hook location and display rules in Genesis plugin.

  • Step #1

    Install the Yoast SEO plugin.

  • Step #2

    On the left hand side of WordPress dashboard, go to the following path

    Yoast > Search Appearance > Breadcrumbs

  • Step #3

    On the settings page, Enable Breadcrumbs

  • Step #4

    For Posts, enable the Category taxonomy.

  • Step #5

    Install the GP Premium plugin.

  • Step #6

    Activate the Elements module

  • Step #7

    Go to the following path in the WordPress dashboard.

    Appearance > Elements > Add new element

  • Step #8

    Choose element type as Hook.

  • Step #9

    In the text box, enter the PHP code mentioned at the top of the article.

  • Step #10

    Select “generate_before_content” for hook location.

  • Step #11

    Check “Execute PHP”.

  • Step #12

    Select “Entire Site” or “All Singular” under Display rules location. (Note: This depends which archives or posts or pages etc you want to display the breadcrumbs path).

  • Step #13

    Click on “Save”.

Related Post :   Push Notification Segmentation - Different Types and Advantages

Result

This is how the breadcrumbs navigation will be displayed above the post title. Home and Category pages show as links. Post link is disabled using CSS code.

Now you should see your breadcrumbs navigation links in WordPress above the post title. If you want at a different place, you can change the hook location.

Yoast Breadcrumbs Settings

The following other options are available under Yoast Breadcrumbs settings page.

  1. Separator between breadcrumbs.
  2. Anchor text for the Homepage
  3. Prefix for the breadcrumb path
  4. … for Archive breadcrumbs
  5. Prefix for Search page breadcrumbs
  6. Breadcrumb for 404 page
This Yoast breadcrumb setting allows to set post taxonomy to category, tag, format or none.

You can also bold the last page in the breadcrumb navigation path.

For taxonomy related settings –

  1. Posts – You can choose Category, Tag, Format and None.

The following link also gives detailed instructions on how to implement Yoast breadcrumbs for different themes.

Leave a Comment