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.
Tagged: Custom Work
This topic contains 6 replies, has 2 voices.
Last updated by Waqas Bin Hasan 1 year, 11 months ago.
Assisted by: Waqas Bin Hasan.
Author | Posts |
---|---|
July 5, 2023 at 12:50 pm | |
sasaB |
Hello Mateus, I am using get_field('field_name', $taxonomy_term) to get image from custom taxonomy. This is returning array as it should in main language but for translations it just returns image ID instead. I've searched forum for this problem but couldn't find any solution. |
July 5, 2023 at 2:07 pm | |
July 6, 2023 at 7:00 am #13955411 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hi, I am assigned this ticket and I'll try my best to help you on the matter. I just visited hidden link and tried to visit the English one at hidden link. However I noticed that if I am not logged into WP Admin, the English one redirects to the home page. But after login, I can visit and see the same header image on both versions. Anyways, can you please write down some steps to reproduce the issue? Because I'll need to reproduce, check and perhaps escalate the issue accordingly. On the other hand, it 'll be better if you can provide the same on a staging or dev site. So we can continue to investigate without risking the live site. Specially if we try to isolate the issue in a minimal setup (i.e. only WPML and most required plugins active). I've set your next reply as private to share this information safely. IMPORTANT: If you don't see the section for providing access information, do not write in the message box or the information may appear as public. See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security. Regards. |
July 6, 2023 at 7:18 am | |
July 6, 2023 at 10:52 am #13958793 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the updates, I can see the error after login. However, I am wondering where can I find that code you are trying? Additionally, the theme looks like a custom one. Can you try the followings? Remember to take full backup of site and database before proceeding. - Deactivate all plugins except WPML's and the ones most needed. If you still encounter the same problem, then stop here and let me know. If it works till this point, then check with your theme and later start activating other plugins one by one while keep rechecking the problem. This way we can see if there's any compatibility problem kicking in with a certain plugin or theme. Of course let me know, in this case as well. In either case, it 'll be great to provide exact and clear steps to reproduce the issue. I may need these to replicate the problem in another isolated environment. Please note that custom coding is out of scope of this forum, but I'll try my best to sort this as much as possible. |
July 6, 2023 at 11:03 am #13958887 | |
sasaB |
Yes, it is custom theme. $destilarna_term = get_term( get_queried_object_id(), 'destilarna' ); $destilarna_img = get_field( 'slika', $destilarna_term ); I am really unable to spend any more time debugging WPML so putting live site on test server, disabling plugins, enabling default theme is not an option right now. |
July 7, 2023 at 5:38 am #13964089 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the updates. However a little context would help understanding that how you are using it. Anyways, please take your time and feel free to get back when ready. Meanwhile, here are some WPML API docs to help you around the custom work: - https://wpml.org/documentation/support/wpml-coding-api/ If you need additional custom work, we recommend you contact WPML Contractors at https://wpml.org/contractors/. |
July 12, 2023 at 5:20 am #14018695 | |
sasaB |
Just to let you know this is still a problem, I have to go manually through all terms and save them again in order to have ACF image field return array as it should. |
July 12, 2023 at 9:11 am #14021173 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the updates. Please note that unless there's a clear context available or you provide me the place where I can see the code in full, I am unable to help. I assume you are referring to ACF's hidden link. But it is not clear if you are switching or setting languages correctly. If you can paste the complete code I can try to help. For the multiple tabs, that's not an issue but the way WPML works. When you switch to a language, the whole session follows it. And since you are opening tabs in the same browser, the session is shared across all opened tabs. Thus the last opened tab 'll reset the language to the currently selected one. However, if you think it is a real problem, please feel free to report in a separate ticket. |