How to enable breadcrumbs?

#26220
  • Resolved Artūrs Pommers
    Rank Math free

    Hello!

    On my main site I have yoast, which works ok, but I’m thinking of switching to rankmath, which I try to do on my dev site, and all looks good, except I have a problem with breadcrumbs – I dont understand how to enable them. I have turned them on, but nothing changes. I have some breadrumbs on site, but I think its woo’s default breadcrumbs.

    Could you please update your documentation so that people using woo could understand how to do it?

    Regards,
    Arturs

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘How to enable breadcrumbs?’ is closed to new replies.