• Resolved awersom

    (@awersom)


    Hello, colleagues, I am faced with a seemingly unsolvable problem.

    How to make it so that in WordPress you can go to categories from the shop page?

    I need to make the links look like this:
    /gifts – shop page
    /gifts/family-gifts – category page, where family-gifts is a category /gifts/family-gifts/product-name – this is a product inside the catalog, inside the category page

    Now I set: /gifts = shop page
    Optional – Product category base = /gifts
    Product permalinks – Custom base = /gifts/%product_cat%/

    But when the product opens with the error Page not found

    Most likely the point is that the value shop page = Optional – Product category base If I put different values, then I don’t get the hierarchy that I need.

    Is it possible to somehow build a normal hierarchy for an online store?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hey @awersom ,

    Thanks for reaching out!

    It looks like you need some help setting up a clear hierarchy for your online store, correct?

    Can you please follow the steps below and see if this makes any difference:

    1. Shop page Setup: Ensure you have a shop page set up correctly. Go to WooCommerce → Settings → Products → General tab and check that your Shop Page is selected correctly:

    2. Permalink Settings: Navigate to Dashboard → Settings → Permalinks, and set your “Custom Base” for product categories to /gifts/%product_cat%/:

    3. Product Category Creation: Create categories that match your desired structure, like ‘gifts’ and ‘family-gifts’.

    • Go to Products → Categories.
    • Create ‘gifts’ as the parent category.
    • Create ‘family-gifts’ as a subcategory under ‘gifts’.

    4. Product Assignment: Assign products to these categories. While adding/editing a product, assign the product to the specific category (‘family-gifts’ in this case).

    If you are still facing the same issue, can you try adjusting the permalink structure by selecting ‘Post name’ or ‘Custom Structure’ and see if this makes a difference?

    If you are still seeing a 404 Page not found error, please can you share clear screenshots of your current permalink settings.? If you do not already have a screenshot tool installed,?Snipboard.io?can be used for easily sharing screenshots.

    Additionally, please can you share a copy of your sites System Status Report which you can find via?WooCommerce?→?Status.

    Select?Get system report?and then?Download for Support. This will download a TXT file that has the contents of the SSR which you can then share with us here.

    Cheers!

    Thread Starter awersom

    (@awersom)

    Thread Starter awersom

    (@awersom)

    If I fill in the Product category base as Gifts, then I get this link:
    /Gifts/gifts/family-gifts/

    If Product category base = product-category then
    /product-category/gifts/family-gifts/

    • This reply was modified 1 year, 4 months ago by awersom.
    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @awersom,

    I can’t access the Google Drive link as access was denied.

    Direct Link: https://dsh.re/36d04

    However, your issue seems to be related to the way you’re setting up your permalinks and category base. Here’s what you can do:

    1. Leave the “Product category base” blank. This will prevent the duplication of the “/gifts” slug in your URL.
    2. Under the “Product permalinks” section, set the “Custom base” to “/%product_cat%/”.
    3. Make sure that you have a category called “gifts” and a subcategory called “family-gifts” under it.
    4. Assign your products to the appropriate categories.

    This should give you the desired URL structure, like “/gifts/family-gifts/product-name”.

    If you’re still encountering issues, please share a screenshot of your current permalink settings and your site’s System Status Report (WooCommerce > Status > Select Get System Report and then Download for Support). This will allow us to better understand your setup and provide more accurate assistance.

    Looking forward to your response!

    Thread Starter awersom

    (@awersom)

    Here is a report and a screenshot of setting up permalinks:

    https://drive.google.com/drive/folders/1uv_HCICYxKoFBqwgy9bHH__Z4_hIZzed?usp=sharing

    Thanks for trying to help

    Mirko P.

    (@rainfallnixfig)

    Hi @awersom 👋

    Here is a report and a screenshot of setting up permalinks: https://drive.google.com/drive/folders/1uv_HCICYxKoFBqwgy9bHH__Z4_hIZzed?usp=sharing

    For some reason I can’t display the image in Google Drive, but I’m going to share a few screenshots of my permalinks setup that show this is perfectly working and result in the Shop page (Gifts) – Product category (Family Gifts) and Product (Product Name) hierarchy.

    Permalink structure

    Full size: https://i.vgy.me/xzbzlg.png

    Optional

    Full size: https://i.vgy.me/XPimN7.png

    Product permalinks

    Full size: https://i.vgy.me/mgpJrd.png

    If entering “.” in the product category base field of the permalinks page doesn’t work (i.e. not saved), add the snippet to remove the product-category slug from this page → https://timersys.com/remove-product-category-slug-woocommerce/.

    Before making any changes to your website, make a full backup. It’s also recommended to test on a staging site first.

    Hope this helps!

    Howdy,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if you need any further help with this.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Hierarchy of an online store’ is closed to new replies.