• Resolved Ameer

    (@itsmeameer)


    Hello,

    I’m facing an issue with the default behavior of Woocommerces’ permalinks and breadcrumbs for products that are in multiple categories.

    I have a product named “Product A” which is in multiple categories. “Category A” and “Category B”.

    When I open the archive page for “Category A”, the product permalink shows as "/shop/category-b/product-a" which is incorrect. No matter how many categories a product has, Woocommerce just selects one of them and displays the same permalink everywhere no matter which archive page is opened.

    The same goes for breadcrumbs, Woocommerce just picks one of the selected categories and displays that category in the breadcrumb (the same category it shows in the permalink).

    Is there a way to correct this?

    When I’m on the “Category B” archive page, the permalink for the product should be "/shop/category-a/product-a" on the “Category A” archive and "/shop/category-b/product-a" on the “Category B” archive and the single product page breadcrumb should also reflect the categories that are in the URL.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support abwaita a11n

    (@abwaita)

    Hi @itsmeameer,

    As a first step, go to WP-Admin → Settings > Permalinks and save your permalinks again. You do not have to make any changes to your permalinks while doing this.

    Let us know if the issue persists after trying the above and also share a copy of your System Status from WooCommerce → Status.

    Thanks.

    I did flush by permalink cache. But it has not changed anything.

    You don’t need my System Status. I’m just on a basic installation of WordPress with the default theme and only Woocommerce installed with its own sample products.

    Gonna need a dev to reply to this one.

    • This reply was modified 3 years, 5 months ago by Hamza.
    • This reply was modified 3 years, 5 months ago by Hamza.

    Hi @hamzawpb,

    If I’m understanding correctly, you’re saying that even if the customer goes through Category-B, the breadcrumbs on a specific product will show Category-A. Is that right?

    That’s the expected behavior. WooCommerce doesn’t update the breadcrumbs based on the navigation of the customer. It’s not going to show the category based on which archive was viewed last by the customer. It’ll render the same if someone goes to the product directly via URL or from any link on the site.

    If you want to have the breadcrumbs reflect the navigation path of the customer, then you’ll need to have that custom created for you. I’m not aware of any plugins that do this out of the box. There are freelance developers available at Codeable who could create something like this for you.

    Let us know if I’ve misunderstood or if you have something else in mind.

    Cheers

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Since it’s been a while since we last heard back from you, I’m going to mark this thread resolved.

    If you have further questions, please feel free to open a new topic.

    Cheers! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Woocommerce permalink & breadcrumbs for products with multiple categories’ is closed to new replies.