Check our WordPress 101 & 201 FREE Video Tutorials here
Jump to content
dalewoods007

[Rank Math SEO Plugin] Filtering Breadcrumbs

Recommended Posts

Hi guys

I would like two do things...

  1. Filter the breadcrumbs output 
  2. 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.

 

Share this post


Link to post
Share on other sites

Hello,

Thank you for contacting MyThemeShop and sorry for any inconvenience that might have been caused due to that.

Sorry to disappoint but, unfortunately, we do not have the filter for the Schema output of the Breadcrumbs. We will add it in the future version of the plugin.

We seek your patience and understanding in this matter.

Meanwhile, if you need any assistance, feel free to open a new support ticket.


🏁Rank #1 on Google With our WordPress SEO Plugin

Score a 💯on PageSpeed and Dominate Search Rankings.

✏ Editing theme files? Please create a child theme to make your changes update-proof.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...