Permalinks and breadcrumbs in woocommerce

Hi there

I have a problem with permalink structure & breadcrumbs on my woocommerce pages… I have 2 questions:

I have set permalinks as “shop base with category” like this: /winkel/%product_cat%/

BUT… When I just view the product category (which are also my main menu items) I don’t get the shop base…

The permalink should be /winkel/usb but instead it shows /product-category/usb

Only when a single product is clicked it shows correctly as /winkel/usb/name-of-product

How can I achieve that it show /winkel/real-product-category-name instead of /product-category/usb??

I don’t like to set Woocommerce as “show products” because then I have all my products on one page and this does not look clean but chaotic for my visitors.

I also don’t like to set Woocommerce settings as “show categories”.

I only want them to be able to navigate via the main menu.

That’s why my main menu has the different product categories so visitors can choose and see the structure.

The only way they can see the complete shop page (categories or all products) is when they click the link “winkel” (which means shop) in the breadcrumb display home > WINKEL > category…

So… I think the best is to remove the shop link from my breadcrumbs and show it as black text like the home button in these breadcrumbs…

How can I achieve this? Or do you think there might be a better way to do it? Also should still be SEO friendly and simple for my visitors to know where they are on my website…

Thanks in advance!!

Hey @Woordenaar,

  1. The category base is different. You need to set it up.

  1. To change the Winkel text color to black in single products and change the cursor, please add this code in your Global CSS
.single-product .x-breadcrumbs a:nth-child(3) {
    color: black;
    cursor: default;
}

To change the href value, please add this to your Global JS.

jQuery('.single-product .x-breadcrumbs a:nth-child(3)').attr({'href': '#'});

Please note that the code provided serve only as a guide. Fixing issues arising from the use of it and further enhancement would be outside the scope of our support.

Thank you for understanding.

Hi there

I already set custom bases for my permalinks but this does not work…

Here are screenshot of how I currently have set up permalinks:

BUT this does not seem to work as I want it to be…

When a single product is being viewed the url is correct. For example: https://audiopc.shop/winkel/netwerk/ppa-studio-paul-pang-ocxo-audio-grade-router/ where “netwerk” is my product category and ppa-studio-paul-pang-ocxo-audio-grade-router is my single product.

BUT the breadcrumb does not show this url structure. It shows Home > Winkel > ppa-studio-paul-pang-ocxo-audio-grade-router but I want it to show Home > Winkel > NETWERK > ppa-studio-paul-pang-ocxo-audio-grade-router

The same applies for my single blog posts. I want the url to be /blog/“name of the category”/“name of the single post”. And I want my breadcrumbs to be exactly the same Home > Blog > “name of category” > “name of blog post”

How do I achieve this???

Thanks in advance for helping me out…

Greetings

Dries

Hey Dries,

Sorry for the lack of info. My previous response was for the URL only and that structure is currently not supported by X Breadcrumbs and the Breadcrumbs element. For now, you need to develop your own breadcrumbs or use a third party breadcrumbs plugin.

For your single blog post, you need to add blog in the custom structure like this.

Thanks.

Ok thanks!! That worked… :slight_smile:

I now almost have what I want… I have two more questions:

When navigating to a specific category on my blog, I have for example the url /blog/category/hardware/

I would like to set it to /blog/hardware/ (without the “category”).

How do I achieve this?

Can I achieve the same for my woocommerce webshop? I always want to have /winkel as base (like /blog on all blog pages). Now in my webshop when navigating to a specific product-category I have in the url for example: /product-categorie/netwerk/ without /winkel. But I want this to be /winkel/netwerk (so with winkel as base and without “product-category”.

Your help is most welcome :slight_smile:

Try following this guide. Please note that this is outside the functionality of X / Pro and the bundled plugins. Issues that will arise from following the guide and further enhancement would be outside the scope of our support.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.