Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #984835

    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



    Thanks for sharing and helping out @guenni007, did you try that out @spql?

    Best regards,


    Hi Guenni007 and Rikard, thanks for your answers. This worked fine, thank you!



    Glad we could help!

    Please take a moment to review our theme and show your support
    Don’t forget to bookmark Enfold Documentation for future reference.

    Thank you for using Enfold :)

    Best regards,

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘translating header content via polylang’ is closed to new replies.