Hi guys
I would like two do things...
Filter the breadcrumbs output
Filter the breadcrumbs schema output
For the breadcrumb output, I found this line on 136 in class-breadcrumbs.pp
/**
* Allow changing the HTML output of the breadcrumbs class
*
* @param string $html HTML output.
* @param array $crumbs The crumbs array.
* @param Breadcrumbs $this Current breadcrumb object.
*/
return $this->do_filter( 'frontend/breadcrumb/html', $html, $crumbs, $this );
However my filter does not get fired
/*
* Fix Breadcrumbs
*/
add_filter('rank_math/frontend/breadcrumb/html', function($html, $crumbs, $context) {
echo '<pre style="display:block">' . print_r($html, true) . '</pre>'; exit();
}, 10, 3);
Could you please tell let me know if you spot something wrong there.
Also, could you please provide the filter that allows me to modify the breadcrumbs schema output.
That would be very helpful thank you.