how to set up rank math breadcrumbs

#408684
Viewing 9 replies - 16 through 24 (of 24 total)
  • Hello,

    For some reason, the code in the header-shop.php was no longer working. However, I have added the code given below to your theme’s functions.php file and now the breadcrumbs are being added correctly to your product pages:

    if (function_exists('rank_math_the_breadcrumbs')) {
    	add_action('woocommerce_before_main_content', 'rank_math_the_breadcrumbs', 10);
    }

    Please check and let us know if you need any other assistance.

    Hi Jaideep,

    Thanks for your help, but I noticed one more thing if I choose to get into a product by the method like this: outdoor water filter > 3L Portable Gravity Bag Water Filter; the breadcrumb is Home > 3L Portable Gravity Bag Water Filter, not Home > outdoor water filter > 3L Portable Gravity Bag Water Filter.

    Hello,

    It doesn’t matter what path you follow to get to the product, the breadcrumbs will always show the same. If you want to include the category in the breadcrumbs, you will have to select them as the primary taxonomy in WP Dashboard > Rank Math > Titles & Meta > Products.

    And if you have more than one category selected for a product, you will have to select the Primary Category to display it in the breadcrumbs. https://rankmath.com/kb/how-to-choose-a-primary-category/

    Hope this helps. Let us know if you need any other assistance.

    Hi Jaideep,

    I did as the blog said, but it still doesn’t work.

    Nigel
    Rank Math business

    Hello,

    I tried the temporary link you shared in sensitive data but it seems to have expired already. Please renew it so we can investigate further.

    Looking forward to helping you.

    Hi Nigel,

    I changed the expired date, please try it again.

    Hello,

    I selected product categories as the primary taxonomy of the products and the categories are now being included in the breadcrumbs:

    Please check and let us know if you need any other assistance.

    Thanks.

    Hi Jaideep,

    It does work now, thank you so much!

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 9 replies - 16 through 24 (of 24 total)

You must be logged in to reply to this ticket.