Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

Relative linking in Wordpress

I'm creating a website in WordPress that has child pages for multiple locations.

For example, the main page has a Home, About, and Contact pages + 15 service pages. And the location pages have the About, Contact, and the 15 service pages duplicated. I have links in the about page linking to the 15 services. Now If I could have a relative link it would be as easy as duplicating this section. What I want the link to do is that if you are on
https://example.com/about/ and you click a service
it takes you to https://example.com/service1/
but if you are on https://example.com/location/
the same link structure takes you to https://example.com/location/service1

I don't want to have to create 15 different links + different menu links for every single location when all you need to do is add service1/ to the end of the slug you are on.

Answer*

Cancel
1
  • What About a page section that links to different services and that is located under every location? Commented Mar 3, 2022 at 1:18