Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You’ve nested the if conditionals, that will not work in this situation. Instead use completely independent, un-nested conditionals without any else conditions.

     if ( 'de_DE' == get_locale() && ! empty( $german )){
         return $german;
     } 
     if ( 'en_EN' == get_locale() && ! empty( $english )){
         return $english;
     }
     // locale is not English or German to get to this point, it must be Italian
     return '<a href="https://test.sacconicase.com/contatti/">Contatti</a>'.'<br>'.'<a href="https://test.sacconicase.com/agenzia/">Agenzia</a>';
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.