How can i add custom “directory” in my URL for pages and posts?
So the main website url is: http://www.example.com
, but when i go to a page I want this kind of URL: http://www.example.com/SOMETHING/new_page
How can I put that “SOMETHING” in URL without affecting WordPress functions?
Go to your
Dashboard => Settings => Permalinks
click on
Custom Structure
and paste this/something/%postname%/
And you can replace
something
It will add the
something
keyword before pages and post url slugs.You have to select “Custom structure” and add a prefix to your permalink structure in the permalinks settings, like:
Here is the the WordPress Codex Page that explain how to choose permalink structure.