• Resolved leew87

    (@leew87)


    i am having a issue trying to get the following working this is what im trying to achive domain.co.uk/shop/ => Shop page listing products
    domain.co.uk/shop/category-name/ => Category page listing products from a category
    domain.co.uk/shop/category-name/subcategory/ => Category page listing products from a subcategory
    domain.co.uk/shop/category-name/subcategory-name/product-name/ => Product page showing product details

    if i do this the /category-name/ and /category-name/subcategory-name/ pages show 404 errors

    how would i resolve this

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

    (@jobthomas)

    Automattic Happiness Engineer

    Hey @leew87 – there are likely ways to work around it, but I’d strongly advise against it for the way that WordPress is built.

    • /shop is your base
    • /shop/product-category is the base for the product categories
    • /shop/%product_cat%/ is that for the products

    But you’ve got /shop in both the product category base and the products base, which confuses the taxonomies of WordPress.

    Normally, you’d get

    * URL/shop/clothing/tshirts/t-shirt-with-logo/ for the product
    * URL/product-category/clothing/tshirts/ for the product base

    But if you make the first word the same, WordPress is trying to look for the “t-shirt-with-logo” category rather than for the product.

    In sum, I’d suggest just going for a different word.

    Thread Starter leew87

    (@leew87)

    hi

    i guess its more reliable to go with something like

    /shop is your base
    /store/product-category is the base for the product categories
    /store/%product_cat%/ is that for the products

    if im understanding correctly thanks for clearing this up it just seems the most logical to have both words the same very surprised its not setup and working by default in this way.

    Plugin Support Job a11n

    (@jobthomas)

    Automattic Happiness Engineer

    I understand that remark @leew87, but that’s not a decision related to WooCommerce, but to WordPress core. Changing that is not a small effort, and I’m sure the core developers have good reasons for this choice.

    Have a great weekend. 👋

    Thread Starter leew87

    (@leew87)

    thanks for clearing this up for me.

    cheers

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

The topic ‘Permalink issue’ is closed to new replies.