How to fix Yoast SEO Breadcrumb http Problem?

June 26, 2020 0 comments
default placeholder

Breadcrumbs are an important part of almost every good website. These little navigational aids don’t just tell people where they are on your site, but they also help Google work out how your site is structured. That’s why it makes a lot of sense to add these helpful little pointers. Let’s take a look at how breadcrumb navigation works. – Yoast

Lots of people are asking questions about the Yoast SEO breadcrumb HTTP and HTTPS issues, WordPress Tickets, stackoverflow.com, and other support channels as well.  For this, I have composed a short and sweet code for this solution.

This solution is very simple and useful for every WordPress user whether you are developer, designers, or owners using Yoast SEO plugin.

What are breadcrumbs?
A breadcrumb is a small text path, often located at the top of a page indicating where the user is on the site. On yoast.com, for instance, the path to our Yoast SEO plugin page is Home > WordPress Plugins > Yoast SEO for WordPress. This breadcrumb trail immediately shows you where you are. Every step of that path is clickable, all the way back to the homepage.

But why is this navigational help called a breadcrumb? When Hansel and Gretel went into the woods, Hansel dropped pieces of bread onto the ground so they could find their way home if they got lost. These breadcrumbs eventually became the model for the ones we see on websites these days.

Here is the quick and smart solution for your HTTP issues.

  1. Copy the following code
    add_filter( 'wpseo_breadcrumb_output', 'custom_wpseo_breadcrumb_output' );
    function custom_wpseo_breadcrumb_output( $output ){
    if( is_page() ){
    $from = 'http://'; // EDIT this to your needs
    $to = 'https://';
    $output = str_replace( $from, $to, $output );
    }
    return $output;
    }
  2. Login to WP Admin Dashboard
  3. Click on Appearance > Editor
  4. Open functions.php(make sure its a child theme).
  5. Paste the code and save it.
  6. Congratulations, it must be working.

Have a Wonderful Day.

Ashok kuikel

Hi, I am Ashok Kuikel, WordPress Developer for WordPress Community. While Cloud Computing Associate and Alibaba MVP and ACA for Cloud Professional.

You can follow me on Social Media, GitHub, and via my Blog Channels.

Leave a Reply

Your email address will not be published. Required fields are marked *

Articles and Tutorials

We love writing about WordPress and latest plugins tutorials, WooCommerce stats, and much more.