Support » Fixing WordPress » create link to other WP site depending on which page you are on

  • haddlyapis

    (@haddlyapis)


    Hi.
    We had 2 individual websites made for our company which i am now in charge of.
    I want to link each page to its corresponding page on the other website e.g. http://www.apis.de/kontact –> http://www.apis-iq.com/contact. At the top of both websites, you can switch between English and Deutsch, but this only brings you to the landing page of the other one.
    Q: Is it possible to determine the url of the link when clicking on the “English” or “Deutsch” links depending on which page you are on?
    thx.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • jruescher

    (@jruescher)

    Hi,
    do you run a single wordpress system for both sites?
    Or do you use 2 wordpress systems?

    haddlyapis

    (@haddlyapis)

    Hi, they are unfortunately 2 separate systems.
    The only way i have thought of so far is to do something with javascript and get the url with window.location.href and then compare it to an object i create with all urls (or better: paths) from the opposite website and then use jquery to replace the url of the tag when someone clicks on it.

    jruescher

    (@jruescher)

    You could install on both systems a multilangual plugin for translating every site.

    after that create a translation for every page (not a real translation, a blank site, with title and slug)

    If this is done, change the url / redirect of the translation page to the other domain (with this plugin for example: https://de.wordpress.org/plugins/page-links-to/ )

    Thats maybe not the best solution, but im unsure how to fix that else, because you have different site slugs/categories

    EDIT:
    or u create a custom meta field, a url field.
    Where u enter the translation link, for each site.
    Edit ur language selector that u change the url with that Custom meta field input.

    • This reply was modified 2 years ago by jruescher.
    • This reply was modified 2 years ago by jruescher.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘create link to other WP site depending on which page you are on’ is closed to new replies.