Tagged: polylang
-
AuthorPosts
-
September 29, 2020 at 11:05 am #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!
October 2, 2020 at 12:48 pm #1250033Hey 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,
VictoriaOctober 4, 2020 at 8:50 am #1250381Thanks for your answer
I left a short credit in my socket, but the reel lines of credit are still undisplayedHave a nice week !
RegardsOctober 6, 2020 at 6:55 pm #1250907Hi 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,
VictoriaOctober 7, 2020 at 10:19 am #1251086Hi 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
October 10, 2020 at 2:14 pm #1251866Hi 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,
VictoriaOctober 12, 2020 at 9:50 am #1252214Thanks Victoria !!
Enfold Support is always 5 stars ratedMany 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, 1 month ago by Ikyo.
October 13, 2020 at 5:53 am #1252430Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Socket per language’ is closed to new replies.