Created
July 9, 2014 11:19
-
-
Save markhowellsmead/9e16afc7917581d79cd5 to your computer and use it in GitHub Desktop.
WordPress WPML - generate link to translated version of a page
This file contains hidden or 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
# The following code creates a link with a translated link text | |
# linking automatically to the translated version of the page $pageID | |
# Tech: WordPress / WPML / PHP | |
# External ref. http://wpml.org/documentation/support/creating-multilingual-wordpress-themes/hard-coded-theme-links/ | |
<?php echo( icl_link_to_element($pageID, 'page', __('Link text','myTheme' ), '','',false,true)); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment