Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
You can remove the WooCommerce breadcrumbs on most themes by adding the following code snippet on your theme’s functions.php file:
/**
* Remove the breadcrumbs
*/
add_action( 'init', 'woo_remove_wc_breadcrumbs' );
function woo_remove_wc_breadcrumbs() {
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
}
The next step will be add the Rank Math breadcrumb snippet on the section that you want them to appear. The code required to show the RM breadcrumbs is shown below:
<?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>
Looking forward to helping you. Thank you.
βββββββ
I am using oceanwp and I want to show rankmath breadcrumbs on all my pages, which php file should i add the code to?
Hello,
Thank you for contacting Rank Math today.
I believe that OceanWP contains an integration for Rank Math breadcrumbs and no extra code is required. You only need to enable breadcrumbs on the theme and Rank Math and this should work.
Looking forward to helping you. Thank you.
ββββββ
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.