How to remove parent category from child category URL’s?

#631105
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

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

    Please note that the Strip Category Base option only removes the /category/ base from your category URLs which is added from WordPress by default. It doesn’t remove your parent category slug from your URLs.

    However, in order to achieve this, you can use an external plugin like Permalink Manager Lite which will allow you to remove the parent category slug from your ULRs.

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    Thanks for the advice. Is there any code available to achieve this without plugin?

    Hello,

    In this case, you can try to change the permalink structure of your website from WordPress Dashboard > Settings > Permalinks and select Custom Structure /%postname%/. However, please note that if you change the permalink structure then you’ll have to create redirections from your old permalink structure to the new permalink structure.

    If that doesn’t work, then you can use this filter on your website to see if that works for you: https://www.thewebtaylor.com/articles/wordpress-remove-parent-category-from-permalink

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Thank you very much. I’ll try the code and if it doesn’t work then I’ll use the plugin

    Hello,

    Sure, and if you have any additional questions about the plugin do open a new support ticket on the forums.

    We are here to help!

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

The ticket ‘How to remove parent category from child category URL’s?’ is closed to new replies.