Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Please add the following filter to your theme’s functions.php to make the change to the homepage link:
/**
* Change the Home URL in breadcrumbs according to the current language in Polylang
*
* @param array $crumbs The crumbs array.
* @param Breadcrumbs $this Current breadcrumb object.
*/
add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
// With this code, we get the home URL with the current language
$home_link = pll_home_url(pll_current_language());
// The first item in the $crumbs array is usually the home (except if it is disabled
// The second item inside each item is the link (so in this case, the home link)
$crumbs[0][1] = $home_link;
return $crumbs;
}, 10, 2);
Let us know if this code fixes the issue.
Don’t hesitate to get in touch if you require any further assistance.
Hey Miguel,
thank you very much, this works like a charm !
All the best
Hello,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.
I already rated you five stars a while ago as this plugin is great with an awesome support !
By the way I have another issue with the breadcrums I posted about here but didn’t have news yet : https://support.rankmath.com/ticket/multilingual-breadcrums-and-cpt/
Hello,
@Alexis Thank you, and we really appreciated your feedback. I’ve replied to your other ticket, and our team will get back to you shortly.
Thank you, and please don’t hesitate to contact us anytime if you need further assistance.