hi there,
is it possible to translate the content of the field named “Phone Number or small info text” in the header by using polylang?
thanks, martin
if you are activating the shortcodes for polylang via your functions.php of your child-theme:
function polylang_shortcode($atts, $content = null){
if (empty($content))
return '';
extract( shortcode_atts( array('lang' => ''), $atts ) );
if (empty($lang))
return "<h3>You must specify 'lang' using shortcode: polylang</h3>";
return ($lang == pll_current_language()) ? $content : '';
}
add_shortcode('polylang', 'polylang_shortcode');
you then can use this in all text fields – and a lot of enfold options input fields too (like footer copyright field) on this :
[polylang lang="en"]PhoneNumber for english sites [/polylang][polylang lang="de"]PhoneNumber for german sites[/polylang]
etc. pp
Hi Guenni007 and Rikard, thanks for your answers. This worked fine, thank you!
Hi,
Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
Don’t forget to bookmark Enfold Documentation for future reference.
Thank you for using Enfold :)
Best regards,
Basilis