Last active
November 24, 2019 18:47
-
-
Save RiodeJaneiroo/357f8f91651ae88e006f987b38da8b76 to your computer and use it in GitHub Desktop.
[Edit url in wpml switcher] #wpml #wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wpml_url_fix( $languages ) { | |
// make your changes to the $languages array here. | |
if($languages['ru']['url'] == site_url()."/sitemap") { | |
$languages['ru']['url'] = site_url()."/sitemap.html"; | |
} | |
if($languages['ua']['url'] == site_url()."/ua/sitemapua") { | |
$languages['ua']['url'] = site_url()."/ua/sitemap.html"; | |
} | |
return $languages; | |
} | |
add_filter( 'icl_ls_languages', 'wpml_url_fix'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment