Archived topic
Breadcrumb link problem
1 reply · Started by Shivam on March 19, 2021
Hey, my breadcrumb links to my category page (like https://shivamk4.sg-host.com/category/seo/) but I want to link it to a separate WordPress page that has the same URL except the word Category in it (like https://shivamk4.sg-host.com/seo/), is there any way to solve this problem since I am creating a silo structure on my blog where one post is main pillar page and other are supporting silos.
For better understanding check this screenshot.
Since I am using Rank math's breadcrumb, first I contacted them but they gave me this code and told me that my theme developer can modify it as per need:
/**
* Allow changing or removing the Breadcrumb items
*
* @param array $crumbs The crumbs array.
* @param Breadcrumbs $this Current breadcrumb object.
*/
add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
return $crumbs;
}, 10, 2);
In case if you guys can help me with that, it would be a big help.
Hi there,
That's strange that they would say that, as it's a Rank Math function/filter. We're not aware of how their breadcrumb system works, so I'm not sure how much help we can be here.
This is definitely something they should be able to help you with, as it's directly related to a feature they offer.
If they meant you can ask us how to add the function, then this article should help: https://docs.generatepress.com/article/adding-php/