Parent category is not removed from product URL

#87466
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Thank you for contacting Rank Math today.

    The parent category category can be removed by enabling remove parent slug option. I enabled this and it seems to work perfectly on your site where only the last child category is seen, please check the screencast I ave added in the senitive section.

    The option to remove category base removes the product-category added to your URLs from your permalink settings.

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    I looked at the screencast. But if you open a product in that category where you stopped, you’ll see that the URL of the product won’t have that last category in the slug. It will only have:
    site.com/product/product-name

    but the expected result is:
    site.com/latest-child-category-name/product-name

    I added %product_cat% to the permalink of the Products, and now it is somehow better.

    But still the issue is, it shows all the ancestor categories in the URL of the product, but we only want to show the last category.

    So let’s say this is the structure of the categories:
    Cat A
    — Cat B
    — Cat C
    —- Cat D

    In this case, C is D’s parent, and A is C’s parent category.
    Now the product URL of a product inside D category is like:
    site.com/Cat-A/Cat-C/Cat-D/product-name

    But we expect:
    site.com/Cat-D/product-name

    I enabled all the options in Woocommerce section of Rank Math’s settings, but still no luck.

    • This reply was modified 4 years, 2 months ago by Hamed Azimi.
    • This reply was modified 4 years, 2 months ago by Hamed Azimi.

    Hello,

    We are sorry but Rank Math does not interfere with that. Rank Math only removes the product-category slug and rest of it is handled by your WP/WooCommerce installation.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Parent category is not removed from product URL’ is closed to new replies.