Support » Theme: Zerif Lite » Polylang strings in front-page.php

  • Resolved coralepuccini


    Hi, I’ve installed the plugin polylang and I was able to translate 90% of homepage strings. I don’t find the way to translate the main title of sections. I noticed that subtitle and content of section just are displayed on admin menù polylang and they are able to be translated, but main title is not recognized.The code of main title section in fron-page.php is this:

    <?php $zerif_contactus_title = get_theme_mod(‘zerif_contactus_title’,’Get in touch’);
    if ( !empty($zerif_contactus_title) ):
    echo ‘<h2 class=”white-text”>’.$zerif_contactus_title.'</h2>’;
    $zerif_contactus_subtitle = get_theme_mod(‘zerif_contactus_subtitle’);
    if(isset($zerif_contactus_subtitle) && $zerif_contactus_subtitle != “”):
    echo ‘<h6 class=”white-text”>’.$zerif_contactus_subtitle.'</h6>’;

    I create a translation string with pll_register_string for zerif_contactus_title in functions.php of theme, but when I add pll_e to echo codex the $zerif_contactus_title seems doesn’t work.

    This is the function:

    pll_register_string(‘contacts’, ‘$zerif_contactus_title’, ‘zerif-lite’);

    Any ideas?

Viewing 2 replies - 16 through 17 (of 17 total)
Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Polylang strings in front-page.php’ is closed to new replies.