how to remove slug from url ?


how to remove /example/?

  • Where is example coming from? Is it a page, category or your root dir?
    – ngearing
    Nov 2, 2017 at 22:33

2 Answers 2


Whenever you register_post_type(), one of the args is rewrite where you can reset the URL to something else. Maybe you can play with this -- try leaving it blank?

Pro tip: You will have to reset permalinks after you do this.


Admin Dashboard > Settings > Permalink: Choose Custom Structure then set your custom structure.

  • not works, i want to fully remove /example/ not change with something else
    – amaric
    Nov 2, 2017 at 21:40
  • So that means your WordPress is installed in a folder named 'example', Right ?
    – Mouad DB
    Nov 2, 2017 at 22:03
  • delete htaccess file and save again custom structure settings.
    – sakarya
    Nov 2, 2017 at 22:24
  • adding details to your answers will help improve your score
    – rudtek
    Nov 3, 2017 at 3:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.