This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is experiencing issues with the auto-translate functionality where the order of team members in the 'The Management Team' section is different on the translated page compared to the original.
Solution:
We have identified that the issue is related to the Post Object and there is a known workaround for it. If you're using a custom order for related posts in a Relationship or Post Object field and notice that the order is not maintained after translation, it's likely because the posts are being ordered by ID instead of the custom order. To fix this, you can add the following code snippet to your theme's
functions.php
file:
add_filter( 'acf/load_value/type=post_object', 'format_order' ); function format_order( $value ){ $lang = apply_filters( 'wpml_current_language', null ); foreach ($value as $key => $id) { $type = get_post_type($id); $value[$key] = apply_filters( 'wpml_object_id', $id, $type, true, $lang); } return $value; }
Please note that this solution might be outdated or not applicable to your case. We highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket with us.
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 2 replies, has 2 voices.
Last updated by 6 months, 4 weeks ago.
Assisted by: Ilyes.