-
AuthorPosts
-
August 16, 2016 at 3:58 pm #673320
Hi,
Polylang does not translate the text inside the copyrigth footer.
How can I resolve this?August 17, 2016 at 11:07 am #673631Hi Jan,
Could you provide us with a link to the site in question so that we can take a closer look please? You can add your own copyright text by adding the following to the Copyright field:
[nolink] Your content here
Best regards,
RikardAugust 17, 2016 at 12:06 pm #673674Hi Rikard,
Here is the admin login.
Thanks!Best regards,
JanAugust 19, 2016 at 6:57 pm #674842Hi Rikard,
Do you have already some information concerning this issue?
Best regards,
JanAugust 21, 2016 at 4:12 am #675140Hi,
You could create a custom shortcode to handle the copyright content per language:
function custom_shortcode_func() { ob_start(); ?> <div class="nav-previous alignleft"> <?php $currentlang = get_bloginfo('language'); if($currentlang=="en-US") { ?> This is English <?php else if($currentlang=="de-DE") { ?> This is German <?php } else { ?> This is Dutch <?php } ?></div> <?php $output = ob_get_clean(); return $output; } add_shortcode('socket_info', 'custom_shortcode_func');
Then you’d place
[socket_info]
as the copyright field value.Best regards,
JosueAugust 22, 2016 at 12:05 pm #675656Hi Josue,
When I test your code I get this error message:
FATAL ERROR syntax error, unexpected ‘<‘ on line number 4
Regards,
JanAugust 22, 2016 at 12:20 pm #675667Hi!
It should have worked fine. You can go to wp-content/themes/enfold/functions.php file and remove the code and try using following one
add_filter('kriesi_backlink','socket_per_language'); function socket_per_language(){ $currentlang = get_bloginfo('language'); if($currentlang=="en-US") { $output = "your custom text in English"; } elseif($currentlang=="de-DE") { $output = "your custom text in German"; } return $output; }
And remove your copyright text in Enfold theme options > Footer.
Best regards,
YigitAugust 22, 2016 at 1:31 pm #675707Hi Yigit,
Thank you for the code.
Can I also use HTML links inside the custom text?Best regards,
JanAugust 22, 2016 at 1:33 pm #675708Hey!
Yes, you can use HTML as following
add_filter('kriesi_backlink','socket_per_language'); function socket_per_language(){ $currentlang = get_bloginfo('language'); if($currentlang=="en-US") { $output = "your custom text in English"; } elseif($currentlang=="de-DE") { $output = "<a href='http://kriesi.at' target='_blank'>your custom</a> text in German"; } return $output; }
Regards,
YigitAugust 22, 2016 at 3:01 pm #675786Hi Yigit,
I also added the Dutch language but the footer is not working for this language.
First I used the else statement for Dutch but I get a 500 error.
With else if no error but it does not work.add_filter('kriesi_backlink','socket_per_language'); function socket_per_language(){ $currentlang = get_bloginfo('language'); if($currentlang=="en-US") { $output = "your custom text in English"; } elseif($currentlang=="de-DE") { $output = "your custom text in German"; } elseif($currentlang=="nl-NL") { $output = "your custom text in Dutch"; } return $output; }
Best regards,
JanAugust 23, 2016 at 8:55 pm #676662Hi Yigit,
As mentioned the Dutch copyright footer is not applied.
Is the ELSEIF statement correct for Dutch in the function?I thought IF, ELSE IF, ELSE would work.
But I get 500 error.Best regards,
JanAugust 23, 2016 at 9:44 pm #676682Hey!
Please try following
add_filter('kriesi_backlink','socket_per_language'); function socket_per_language(){ $currentlang = get_bloginfo('language'); if($currentlang=="en-US") { $output = "your custom text in English"; } elseif($currentlang=="de-DE") { $output = "your custom text in German"; } else(){ $output = "your custom text in Dutch"; } return $output; }
Best regards,
YigitAugust 24, 2016 at 9:04 pm #677243Hi Yigit,
Strange, this does also not work for the Dutch footer version.
Also 500 error!Best regards,
Jan- This reply was modified 8 years, 2 months ago by jawes.
August 25, 2016 at 7:13 am #677370August 25, 2016 at 12:22 pm #677466Hi Josue,
This is the error:
Parse error: syntax error, unexpected ‘)’ in /home/project1/domains/…./public_html/wp-content/themes/enfold-child/functions.php on line 50Cannot find a unexpected ) on this line.
Best regards,
JanAugust 25, 2016 at 1:44 pm #677494Hi,
Do you mind posting FTP and WP logins here privately so we can look into it?
Best regards,
YigitAugust 25, 2016 at 3:03 pm #677538Hi Yigit,
Here are the credentials you asked for.
I removed your latest code, so you will have to apply it again for testing.
Thank you for investigating the issue.Best regards,
JanAugust 25, 2016 at 3:11 pm #677546Hi!
PHP opening tag was missing in functions.php file, i thought that was the issue and add the code with PHP opening tag but that still crashed the site. I am getting “Connection timed out or server hung up. The server you are connecting to may be configured to limit the number of connections you are allowed to make.” when i try to access to your server via FTP :/
Sorry about that!Cheers!
YigitAugust 25, 2016 at 4:57 pm #677659Hi Yigit,
Maybe I will have to whitelist your IP.
Best regards,
JanAugust 26, 2016 at 3:41 am #677895Or you can paste the full contents of your functions.php in a pastebin and we’ll inspect it.
Best regards,
JosueAugust 26, 2016 at 12:36 pm #678086Hi,
I checked the functions.php and all non-related code is just removed!
How about fixing this first.Best regards,
Jan- This reply was modified 8 years, 2 months ago by jawes.
August 26, 2016 at 12:41 pm #678089Check the pastebin for the code.
Best regards,
JanAugust 26, 2016 at 7:07 pm #678303Hi,
I shared confidential information, so I appreciate if this is handled carefully.
Now I had to download a backup to get the code back in the file.
Why is support not corresponding on this matter?Best regards,
JanAugust 27, 2016 at 1:05 am #678355Hi,
Here’s the error:
else () {
Should be:
else {
Best regards,
JosueAugust 28, 2016 at 4:31 pm #678661Hi Josue,
It is working, thank you for resolving.
Best regards,
JanAugust 28, 2016 at 10:22 pm #678693You are welcome Jan, glad to help :)
Regards,
Josue -
AuthorPosts
- The topic ‘Polylang copyright footer’ is closed to new replies.