Hide the main category in URL

#143845
  • Resolved Redakcja
    Rank Math free

    Hey. Your product is great. Congratulations and thank you.

    I know how to hide the word “category” from a URL, but how can I hide the parent category from a link when it looks like this:

    testsitefromweb.com/furniture/tables

    I want it to look like this

    testsitefromweb.com/tables

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Danial
    Rank Math business

    Hello,

    Thank you for contacting Rank Math, and sorry for any inconvenience that might have been caused due to that.

    If you already hide the category from the strip category base, it should look like the URL you want.

    You can strip your category from Rank Math > General Settings > Links > Strip Category Base.

    https://rankmath.com/kb/general-settings/#strip-category-base

    Is this what you are looking for? Let us know.

    I hope this resolves your issue.

    No. I know how to do it.

    My point is to hide the overarching category. e.g. superextradomain.com/news/business
    remove “news” so that only this link remains superextradomain.com/business

    Hello,

    Thank you for following up.

    If the parent category is still showing in the URL, it seems that you have set your permalinks in this way /%category%/%postname%/.

    You can remove the /%category%/ or choose Post name in WordPress > Settings > Permalinks to only show the post name without the parent category.

    I hope that helps. Thank you, and looking forward to your update.

    You know, it’s not about the link to the entry, but the link to the category;) I want the link to the sub-category to be devoid of the name of the parent category.

    Hello,

    Thank you for following up, and sorry for the delay.

    If you wanted to hide the parent category if you access the sub-category page, you can set a regex redirect to it. Please refer to this screencast:
    https://i.rankmath.com/e7JpoB

    The source URL would be: /parentcategory/(.*)$
    Destination URL: /$1

    If that didn’t help, could you please record a video screencast using a tool like Loom showing the issue and edit the first post on this ticket in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure, and only our support staff has access to that section.

    I hope that helps. Thank you, and we really look forward to helping you.

    Hey. Thanks, but unfortunately it does not work. My server is NGINX and I use multisite.

    Roel John
    Rank Math business

    Hello,

    Thank you for contacting Rank Math again.

    Unfortunately, there are no settings or filter hooks in Rank Math that can remove the parent category in the URL.

    You can use the link below but were not tested it yet. As you can see the link below you really need to create a custom code if you really want to remove the parent category in the permalink.
    https://wordpress.stackexchange.com/questions/6106/remove-parent-category-from-permalink-basically-only-have-the-child-category

    The other way is that find a plugin that can remove the parent category.

    Hope this solves your issue and don’t hesitate in getting in touch if need any further assistance.

    Thank you.

    Ok.
    Thank you for your help. You are great. Have a nice weekend.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

You must be logged in to reply to this ticket.