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 '17 at 22:33

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 '17 at 21:40
  • So that means your WordPress is installed in a folder named 'example', Right ?
    – Mouad DB
    Nov 2 '17 at 22:03
  • delete htaccess file and save again custom structure settings.
    – sakarya
    Nov 2 '17 at 22:24
  • adding details to your answers will help improve your score
    – rudtek
    Nov 3 '17 at 3:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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