How to fix Yoast SEO Breadcrumb http Problem?
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.
- 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;
} - Login to WP Admin Dashboard
- Click on Appearance > Editor
- Open functions.php(make sure its a child theme).
- Paste the code and save it.
- Congratulations, it must be working.
Have a Wonderful Day.
Leave a Reply
You must be logged in to post a comment.