0

How to create link for current page but in different subdomain (translation) in WP?

For example on https://domain.com/test_page link to https://uk.domain.com/test_page/ and https://pl.domain.com/test_page/

6
  • the specific kind of translation you're asking for is normally done with a plugin, or manually by hand with a multisite, sadly you can't ask for recommendations on this stack but there are several very well known popular and easy to find solutions for this. Writing a system from scratch will be very difficult/time consuming, and there are multiple ways to do it which means it will be difficult to write an answer as it will need to cover every single one, making it the size of a small book.
    – Tom J Nowell
    Commented Feb 22, 2023 at 17:57
  • yes, but I need only find current ulr and change domain.com/test_page to uk.domain.com/test_page. only show link to different translation.
    – Marcin
    Commented Feb 22, 2023 at 19:13
  • do you already have translations? If so then you can solve this with server level redirects without touching WP at all
    – Tom J Nowell
    Commented Feb 23, 2023 at 8:05
  • yes, but I need only to create links for Google to translated pages. this will speed up the process of scanning these pages.
    – Marcin
    Commented Feb 23, 2023 at 12:07
  • oh, that's unrelated to what you've asked for, Google uses HTML header tags to discover alternative language versions of the current page, not subdomains. Note that in this context a link is a <a> tag
    – Tom J Nowell
    Commented Feb 23, 2023 at 14:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.