WordPress rewrite url /item1 to /about-us/item1

I have a situation where I need some custom routes in my WordPress set up.

In my menu, there is an 'about us' item (which I set as a custom link) but it is not clickable, and just has 2 sub items in a drop down. The 2 sub items, are pages that do not have a parent page.

Read More

So when I click on either of those sub items i get this for example. www.example.com/item1 but I want it to be like this www.example.com/about-us/item1

I’ve made the 'about us' item as a custom link in the WordPress menu builder with no actual link because the client wants that as the header item with those 2 children, but doesn’t want a standard ‘about us’ page so it does screw up the urls.

Is there a function I can use to rewrite the urls, and will the default search give me the new urls back as the permalink if they ar found in the search results?

I guess I could create an ‘about-us’ page, but not do anything with it except using it for hierarchy purposes but it seems a bit messy to do that, plus I don’t want the risk of it showing up in search results at all.

Related posts

1 comment

  1. You have to create the child page with those sub pages and then use custom links for your entire About Us nav section with dropdowns. There is no other way to do this unfortunately.

Comments are closed.