• slacle

    (@slacle)


    Is there a way to make external (custom) links in the navigation menu dynamic?

    With this I mean that links to external websites added to the menu using custom links will keep working if the URL or subdomain of the external website changes.

    For example a WordPress website which is at https://www.myblog.com will have a custom link in the nav menu that goes to https://www.externalsite.com/link1
    Normally you would add the entire URL of course. But is there a way to add only /link1 and WordPress will add everything infront? That way if https://www.externalsite.com changes to dev.externalsite.com for example, the links don’t need to be changed manually?

    I’m thinking there’s probably a way to do it using $_SERVER['HTTP_HOST']
    But I don’t know where to do it and how to go about it.

  • The topic ‘dynamic external links’ is closed to new replies.