0

how to remove slug from url ?

example.com/example/new-post/

how to remove /example/?

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

2 Answers 2

0

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.

-1

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

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

Your Answer

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

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