This thread is resolved. Here is a description of the problem and solution.
Problem:
It is currently not possible to translate the Ocean WP Footer Template created inside of the Theme Library.
Solution:
Our compatibility team provided a fix that will need to be implied by the theme author into their theme:
Set the custom field ocean_custom_footer_template to copy-once and update the page and its translation.
Go to plugins/ocean-extra/includes/metabox/metabox.php
Find
if ( $meta = get_post_meta( oceanwp_post_id(), 'ocean_custom_footer_template', true ) ) { $template = $meta; }
Add this line after it
$template = apply_filters('wpml_object_id', $template, 'oceanwp_library', true);
Relevant Documentation:
This is a compatilbity issue between OceanWP and WPML.
Further information about how to translate OceanWP can be found here:
https://wpml.org/documentation/theme-compatibility/build-multilingual-wordpress-sites-using-oceanwp-theme-and-wpml/
67% of people find this useful.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 12 replies, has 3 voices.
Last updated by luisaL-3 4 years, 10 months ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
January 8, 2020 at 3:48 pm | |
Fred |
Hi, so i'm trying to translate my elementor footer template for my OceanWP child theme. I've read a bunch of topics about this issue but i can't make it right mainly because i can't find the right domain and the right string in WPML > String Translations. So i did click on the link "Translate texts in admin screens" Any clue for me ? Thank you. |
January 8, 2020 at 4:54 pm | |
January 8, 2020 at 11:34 pm #5257231 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I have created a test site and installed OceanWP in its latest versions. wordpress-351980-1118207.cloudwaysapps.com/wp-login.php Credentials: My problem is, that I am not familiar enough with this theme and I tried to set up a footer that will not be visualized on my test page. Could you please check if I missed something and let me know if the same issue occurs on this test site? Kind regards |
January 9, 2020 at 8:48 am #5259653 | |
Fred |
Hi Andreas, |
January 9, 2020 at 4:42 pm #5263867 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Exactly, thank you. I actually tried to use the backend theme options but they seem not to work as expected. I then tested and it was kind of tricky to translate the footer. First of all, I got to tell that the translation works once the plugin "Ocean Extra" is disabled. Now, in order to translate the footer, I first had to duplicate the original footer, and then edit the translation manually (translate independently to cancel the connectivity as duplicate). Then I tried to translate the Shortcodes using the WPML Translation Editor and after that, I was able to see the admin text entry on String Translation to translate the ID only. Here some more detailed steps: 1) Go to Theme Library Please let me know if you experience different results on your live site. How does it behave if you use Elementor Templates instead, would this be an appropriate workaround in the meantime? I am escalating this issue to our compatibility team and I will follow up with you as soon I receive more feedback. Kind regards |
January 9, 2020 at 5:10 pm #5263977 | |
Fred |
Hi Andreas, First let me thank you for all your efforts of this matter ! OK, a lot of infos here 🙂 1) I can't disable "Ocean Extra", it's an active part of the theme. No more "Theme Panel" (and library) without that. Look, it's gone on your test site 🙂 2) The thing that confused me the most is why you have the "admin_texts_theme_mods_oceanwp" in the domain list and i don't ! 3) You're right, may be it's just a problem with the way the footer template is handled by OceanWp so i can use an Elementor Template for the Footer instead if i can't make it work. The result would be the same anyway. I'll see if it's only "footer" related cause the other templates in OceanWP's Library are used as hooks (something Elementor can't do by itself). Again : thank you ! |
January 9, 2020 at 7:50 pm #5264793 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hi! Thank you for your message. Our compatibility team will work on a solution and I will be in contact asap. Onwards your questions: 1) I can't disable "Ocean Extra", it's an active part of the theme. No more "Theme Panel" (and library) without that. Look, it's gone on your test site 🙂 I understand. In fact, on the test site, it is working as I disabled Ocean Extra, which makes me wonder why this works if the plugin is supposed to be responsible for the library. I guess our team will be able to fix this soon and I will provide the workaround. We might also try to reach the theme author in order to implement changes. 2) The thing that confused me the most is why you have the "admin_texts_theme_mods_oceanwp" in the domain list and I don't! Exactly, I also think this should work after duplicating the Library Template. Please let me know if it worked out. Try to follow my exact steps. In fact, I am unsure if it is really necessary to set Library as translatable and use the WPML Translation Editor, as in the end, I had to use String Translation to translate the ID anyway. 3) You're right, may be it's just a problem with the way the footer template is handled by OceanWp so i can use an Elementor Template for the Footer instead if i can't make it work. The result would be the same anyway. I'll see if it's only "footer" related cause the other templates in OceanWP's Library are used as hooks (something Elementor can't do by itself). Indeed, I think it might be an appropriate workaround for the meantime until I can provide a workaround for the theme library. Let me know if you run into any issues. Kind regards |
January 23, 2020 at 12:32 am #5344499 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Could you please make a backup of your site and database and apply the following fix? I have set the custom field translation setting of the ocean_custom_footer_template to copy-once and update the page and its translation. Please proceed as followed or provide me server access for further assistance. Go to plugins/ocean-extra/includes/metabox/metabox.php if ( $meta = get_post_meta( oceanwp_post_id(), 'ocean_custom_footer_template', true ) ) { $template = $meta; } Add this line after it $template = apply_filters('wpml_object_id', $template, 'oceanwp_library', true); This should get the translated ID of the translated footer on the translated page. You don't need to translate any Footer ID. It solved the issue on my localhost copy of your site. Kind regards |
January 23, 2020 at 12:02 pm #5348125 | |
Fred |
Hi Andreas, So i've made the edit on the metabox.php and now it's working as expected. So i guess, no more update of the "Ocean Extra" plugin without that patch 🙂 thank you ! |
January 23, 2020 at 2:38 pm #5350349 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hi! Thank you for your kind words. I have to give credit towards our compatibility who had a fix ready in no time. We will further try to reach out to the plugin author in order to implement the changes into his next plugin update, as if those edits will not be taken into consideration, the upcoming plugin update might overwrite our fix again. If possible, I would further suggest you additionally reach out to the OceanWP support and explain the issue, as I did not receive any feedback yet about if we were able to reach the author. Kind regards |
January 23, 2020 at 3:07 pm #5350737 | |
Fred |
Allright ! Thanks a lot to you and the team ! You guys rock ! |
May 10, 2021 at 5:47 pm #8732383 | |
luisaL-3 |
This solution no longer works with the latest oceanWP metabox.php as it has been totally reworked. plugins/ocean-extra/includes/metabox/metabox.php The old problem with WPML and OceanWP yet persists. Any new solutions? |
May 11, 2021 at 9:07 am #8736455 | |
luisaL-3 |
I was able to fix this using #5344499 in OceanWP 1.7.5 |
May 11, 2021 at 9:49 am #8736891 | |
luisaL-3 |
Update: In OceanExtras 1.7.0 this fix work both for header and footer. In OceanExtras 1.7.5 it does not work for the header properly anymore, e.g. Logo Link. |