I have a gallery in options page. In the main language displays the correct order in front page. The problem is that in secondary languages it shows images in alphabetic order. Should display images in custom gallery order as usual.
I’m using ACF PRO 5.2.5 and WPML 184.108.40.206
This also happen with the gallery in a page. I moved to options in order to solve it but didin’t work.
This is the PHP code for the gallery.
$images = get_global_option(‘logos_clientes’);
if( $images ): ?>
<?php foreach( $images as $image ): ?>
” alt=”<?php echo $image[‘alt’]; ?>” />
<?php endforeach; ?>
<?php endif; ?>
Hello, i have the same problem :
<?php $galerie = get_field('galerie'); print_r($galerie); ?>
In my main language front page order is equal to admin order, and in my other languages order is not equal to admin, order changes are ignored.
So you’ve tried changing the order on a translated page and it still shows the images in alphabetical order instead?
If possible, could you try switching your main language and see if the issue appears on the old main language and disappears on the new main language?
Yes for your first point.
I did your test, i passed my main language to EN and it’s ok for all languages ! the issue disappears and order is ok for all.
But when i reset my main language to FR the EN order is again not ok.
Ah okay.. interesting. That means the issue lies in having a different main language than english.
And you’re using the latest version of WP, WPML and ACF? ACF 5 or 4?
Yes that’s it.
WP (4.2.3), WPML (3.2.2) and ACF (5.2.8) are up to date.
Hello, some news with this issue ?
Hi, i have some news and manual fix !
The problem is when i duplicate a post with a gallery field and i use the button “Overwrite with FR content”, images in the gallery (in EN post) are the FR images and not the EN duplicated images.
So to fix the issue i have to delete the images in the gallery and click on the “Add to gallery” button to select again the good images (EN duplicated images).
Do you think this action can be automated ? by ACF or WPML ?
Sorry for my english…
Same problem here! Need to talk with WPML team?
In my case calling to field and forcing original post no solved the problem:
$id = icl_object_id($v['wp']->ID, 'property', true, ICL_LANGUAGE_CODE); $img = get_field('galeria',$id);
$id = icl_object_id($v['wp']->ID, 'property', true, "en"); $img = get_field('galeria',$id);
$id = icl_object_id($v['wp']->ID, 'property', true, "es"); $img = get_field('galeria',$id);
In this 3 cases, order is correct in main language (es) and incorrect in others.
The trick from webloft here: http://support.advancedcustomfields.com/forums/topic/acf-gallery-vs-wpml/ works for me.
Yeah it works since he’s fetching the images from the main language instead. A decent workaround but it does require some unnecessary stuff going on and makes translating alt tags etc hard to do.
My opinion is still to nag at the WPML team to fix the duplication process so it includes images since that seems to be the root of the problem.
Thanks for your reply, but seems they aren’t interested in this integration:
For now, this works for me, although I know that’s not the optimal solution
Well there you go. In my experience that’s generally the response you get from WPML.. not their biggest fan tbh 🙂
Perhaps checking to translate media in WPML settings makes some magic happen?
I have the same proble. Any news about this?
Hello, I have the same problem.
The point is that the translated gallery don’t change the order even manually.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2018 Advanced Custom Fields. Subscribe