permalinks – Custom links in menus not working in multiple environments


I have a top menu with links and for some of them I need to use “Custom links” instead of linking to pages. This mean I have to write instead of WordPress directly referring to the page for me with page linking. This all works fine on the live (production) site.

When testing I use a stageing environment. All page links now go to which is good. However, the custom ones still go to the production site since I have hard coded them.

I have tried to use /index.php/pagename (answer from this question). This will take me to something that looks like root/index.php/pagename. The problem is that my staging environment looks something like this: Root will take me to but the real stage page is at I hope you get what I mean 🙂

How can I use custom links in menus that will work for all environments?

eligolf 4 months 2022-07-27T01:22:47-05:00 0 Answers 0 views 0

Leave an answer