/** * Add hreflang tags for GTranslate subdomain languages * ExploreTraveler.com */ add_action( 'wp_head', 'exploretraveler_add_hreflang_tags', 1 ); function exploretraveler_add_hreflang_tags() { // Get the current path (without domain) $path = $_SERVER['REQUEST_URI']; // Clean the path (remove query strings if any) $path = strtok( $path, '?' ); // List of your languages (subdomain => hreflang code) $languages = array( 'en' => 'https://exploretraveler.com', // English (main) 'es' => 'https://es.exploretraveler.com', // Spanish 'ar' => 'https://ar.exploretraveler.com', // Arabic 'zh-CN' => 'https://zh-CN.exploretraveler.com', // Chinese Simplified 'zh-TW' => 'https://zh-TW.exploretraveler.com', // Chinese Traditional 'fr' => 'https://fr.exploretraveler.com', // French 'de' => 'https://de.exploretraveler.com', // German 'id' => 'https://id.exploretraveler.com', // Indonesian 'ja' => 'https://ja.exploretraveler.com', // Japanese 'ko' => 'https://ko.exploretraveler.com', // Korean 'ms' => 'https://ms.exploretraveler.com', // Malay 'ru' => 'https://ru.exploretraveler.com', // Russian 'uk' => 'https://uk.exploretraveler.com', // Ukrainian 'tl' => 'https://tl.exploretraveler.com', // Filipino ); // Output the tags foreach ( $languages as $code => $domain ) { $url = rtrim( $domain, '/' ) . $path; echo '' . "\n"; } // x-default points to the English version $default_url = 'https://exploretraveler.com' . $path; echo '' . "\n"; }
Skip to content

Tokyo

Meiji Jingu Shrine Sake Barrels

Meiji Jingu Shrine Sake Barrels

Meiji Jingu Shrine Sake Barrels Meiji Jingu Shrine Sake Barrels are bright, colorful, and unique. One of the most intriguing things at Meiji Shrine in Shibuya‬ is theRead…

Fish market

Tsukiji Fish Market In Tokyo Japan

Tsukiji Fish Market In Tokyo Japan Welcome to Tsukiji Fish Market, the largest wholesale fish market in the world. Here, you will find excitement and adventure in theRead…

Shopping Tsukiji Market (築地市場)

Shopping Tsukiji Market (築地市場)

Shopping Tsukiji Market (築地市場) Shopping Tsukiji Market (築地市場) is exciting and on unique experience. The market is actually two markets. The inner market is a fish wholesale marketRead…