Support » Plugin: WooCommerce » Permalink/URL Slug Structure

  • Resolved billy-boy

    (@billy-boy-1)


    hello,

    I am really impressed with Woocommmerce and Storefront, but am a bit stuck on my URL Hierarchy for the store -> Product categories -> Products and am hoping there is a straightforward way to get a (imo) more consistent url pattern. I understand that there are mechanisms in place to prevent conflicts, ie category or product names inadvertently matching something used elsewhere but, in my case, I have no risk of that happening (are not even any normal “categories” used only product categories/products and single pages).

    Info: my site is multilingual, using polylang pro (in case relevant, but shouldnt be an issue since the urls are always unique due to the /en/ etc after .com)

    Anywho, what I want to achieve is along these lines:

    mysite/shop
    mysite/shop/%product_cat%/
    mysite/shop/%product_cat%/”product”

    but no matter what it wont work, at the very latest when drilled down to the product. I even attempted a “less desirable” workaround, ie changing my shop page slug to “store” so it would be:

    mysite/store
    mysite/shop/%product_cat%/
    mysite/shop/%product_cat%/”product”

    but even that wouldnt work. I have messed around with permalink structures and string translations under languages until i am blue in the face but no luck.

    I have looked at permalink plugins that deal with this (such as Premmerce permalink manager and Permalink manager lite) but at least in the free version it wont work to get this structure and, although i definetely dont mind paying for plugins, it seems like there must be a easier and free way to achieve just this ONE thing…. am a-ok with all the other permalink structures as is. I don’t mind using a function or whatever, or maybe i am misunderstanding permalinks and there IS a way to achieve this straighforward, linear structure without having to pad it with “filler” like “product category” or use store/%product_cat%/ and switch to shop/%product_cat%/”product”…..

    idears?

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

    (@rur165)

    Hello @billy-boy-1 ,

    So, if I understand correctly from your description you want your permalinks structures to be like this –

    Shop page – mysite/shop
    Product category page – mysite/shop/%product_cat%/
    Single product page – mysite/shop/%product_cat%/product

    Is this right?

    You can get this result by configuring them like these –

    1. Select your shop page under wp-admin > WooCommerce > Settings > Products > Shop page. Also, the shop page has the slug shop in it.
    2. Set your permalinks in wp-admin > Settings > Permalinks for product category base like this – /%product_cat%https://prnt.sc/10dwajv
    3. Set your permalinks in wp-admin > Settings > Permalinks for product base like this –
    /shop/%product_cat%/https://prnt.sc/10dwb7p.

    This should give the expected outcome of your permalinks.

    Thank you 🙂

    Plugin Support Rashed Ripon (a11n)

    (@rur165)

    Hi there,

    I just realized making such changes to the “Product category base” breaks page permalinks like the “cart” page. Also, it is not advisable to remove these base links. You can read more here – Removing /product/ , /product-category/ , or /shop/ from the URLs.

    I found a code solution to the problem here – How to Remove the Product-Category Slug in WordPress WooCommerce

    This is working as expected so you can try this method instead.

    Thank you 🙂

    Thread Starter billy-boy

    (@billy-boy-1)

    thanks for the help! but, it looks like the solution in that link, based on the comments, has issues with the actual url for seo and doesnt work so good when there are subcategories etc…. so, will keep looking for a workaround. maybe a paid plugin will be the only way to do it correctly but will wait and see if any other clean solutions first.

    Plugin Support Rashed Ripon (a11n)

    (@rur165)

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Permalink/URL Slug Structure’ is closed to new replies.