Created
June 13, 2018 09:35
-
-
Save caralgar/e8474e15909c72104b262897bf479e97 to your computer and use it in GitHub Desktop.
Translate "Home" from breadcrumbs by yoast
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
<?php | |
function wpseo_translate_home_breadcrumb($links) { | |
if ( $links[0]['url'] == home_url('/') ) { | |
switch (ICL_LANGUAGE_CODE) { | |
case "es": | |
$links[0]['text'] = 'Inicio'; | |
break; | |
default: | |
$links[0]['text'] = 'Home'; | |
break; | |
} | |
} | |
return $links; | |
} | |
add_filter('wpseo_breadcrumb_links', 'wpseo_translate_home_breadcrumb'); | |
Hi
Hi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi