Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1249316

    Hi support

    I’m using Polylang with enfold
    I’ve found on the support forum how to whange the socket text with the language
    I apply the proposed solution, and I’m pretty sure I don’t make a mistake…But no result in the socket.

    add_filter('kriesi_backlink','socket_per_language');
    function socket_per_language(){ 
    $currentlang = get_bloginfo('language');
    
    if($currentlang=="en_GB") {
    $output = "English content";
    }
    elseif($currentlang=="fr_FR") {
    $output = "French content";
    }
    return $output;
    }

    Is there something that has evolved since (2016).Is there a more efficient way to code it?

    Thank you!

    #1250033

    Hey Ikyo,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1250381

    Thanks for your answer
    I left a short credit in my socket, but the reel lines of credit are still undisplayed

    Have a nice week !
    Regards

    #1250907

    Hi Ikyo,

    From what I see in code if the [nolink] and other strings are added in the theme options they overwrite whatever code was added in the functions.php.

    Best regards,
    Victoria

    #1251086

    Hi Victoria

    I understand :)

    I couldn’t leave this field free while waiting for the problem to be solved, that’s why I added credits next to [nolink]. But even if I remove these credits, the function doesn’t appear.

    Thanks for your help

    #1251866

    Hi Ikyo,

    I adjusted the code for you. Please check.

    The solutions for others:

    
    add_filter('kriesi_backlink','socket_per_language');
    function socket_per_language(){ 
    $currentlang = get_bloginfo('language');
    
    $output = "English content";
    if($currentlang=="fr-FR") {
        $output = "French content";
    }
    return $output;
    }
    

    Best regards,
    Victoria

    #1252214

    Thanks Victoria !!
    Enfold Support is always 5 stars rated

    Many thanks
    Kind regards !

    PS : little clue for another case, just add an empty space in admin footer to prevent the copyright by default to be displayed

    • This reply was modified 4 years, 2 months ago by Ikyo.
    #1252430

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Socket per language’ is closed to new replies.