[OFFER ALERT!] This Halloween, Get Any Premium Theme for Just $19 [GET IT NOW]
Jump to content

[Rank Math SEO Plugin] Filtering Breadcrumbs


dalewoods007
 Share

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.

 

Link to comment
Share on other sites

  • Support

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...