Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @annafa88,
    ?
    Thank you so much for getting in touch.
    ?
    The best approach for this is to include the /shop/ slug in your Product’s permalink structure. See the screenshot for your reference:?https://i.rankmath.com/i/k42W8x
    ?
    Then, head over to your WordPress Dashboard > Rank Math > General Settings > Woocommerce and make sure the option “Remove base” is disabled.
    ?
    Let us know how that goes. Looking forward to helping you.

    Thread Starter annafa88

    (@annafa88)

    Hi,

    Thanks for your quick return.

    The category base was disabled already. And also the category slug was exactly as you mentioned it should be. However it doesn’t work that way. Do you have any other ideas?

    • This reply was modified 4 months, 3 weeks ago by annafa88.
    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @annafa88,
    ?
    You can’t use the same base for products and product categories. WordPress URL parsing is just not “smart” enough to handle different types of content under the same “prefix”. WordPress will either try to parse the URLs as products?or?categories, depending on the specific order they are found in the rewrite table, and will fail and return a 404 on the other type.
    ?
    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thread Starter annafa88

    (@annafa88)

    Hi,

    Thanks for your reply.
    I have found an example on WordPress where it is not like this:
    The category URL is:
    https://baltresto.com/shop/wood-fired-hot-tubs/ice-bath
    The product URL is:
    https://baltresto.com/shop/wood-fired-hot-tubs/ice-bath/cold-plunge-tub-from-fiberglass-for-2-persons
    How can I achieve exactly the same?

    Best,
    Anna

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @annafa88,
    ?
    To achieve this you need to make sure that the product permalinks includes the “%product_cat%” in the custom base under WordPress Dashboard > Settings > Permalinks.
    ?
    Then you need to select the primary category to be the one with the path you want to show on the URL using this tutorial as reference:?https://rankmath.com/kb/how-to-choose-a-primary-category/
    ?
    That should help you get the category path into the product URL without any issues.
    ?
    Don’t hesitate to get in touch if you have any other questions.

    Thread Starter annafa88

    (@annafa88)

    Hi @rankmathsupport,

    Thanks for getting back on this but it still doesn’t work.
    1. I have the product base set to “/shop/%product_cat%/” in the permalink settings. That should do it I assume. The product part is fine and the products also appear like this: https://eisbaden.de/shop/eisbaden-training/community-mitglied/
    2. However the categories don’t and here I struggle. The category for the product above appears as https://eisbaden.de/produkt-kategorie/eisbaden-training/ instead of https://eisbaden.de/shop/eisbaden-training/

    Do I need to have a primary separate category which is “shop” and then in each product choose this as primary category and second the “eisbaden-training” for instance?

    Best,
    Anna

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @annafa88,
    ?
    Yes, with WordPress and without using a custom permalink manager plugin, you need to create a parent category for all others with that slug so that it gets added to the category URL structure.
    ?
    Don’t hesitate to get in touch if you have any other questions.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.