Skip Navigation

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 7 replies, has 7 voices.

Last updated by Amir 8 years, 6 months ago.

Assigned support staff: Amir.

Author Posts
April 15, 2012 at 11:07 am #55697


We want to improve compatibility between WPML and ACF. If you're using the two plugins and are seeing ANYTHING that doesn't work quite as you expect, please add your comments here.

Tell us:
* Where's your site (if it's online already)
* What you're trying to do
* What's working not as expected

April 16, 2012 at 11:08 am #55794


I really want to use ACF and WPML together! Seemed to be pretty buggy on my first play. I'm still new to WPML, first day using it actually.

I don't currently have a publicly accessible site, but I'll try and contribute as much as possible once I've investigated more.

April 16, 2012 at 1:17 pm #55801


That is awesome! Thank you guys for showing that you do care for this particular compatibility. It didn't seem ACF author is that eager.

I used ACF before, then stopped when I realized it's not compatible with WPML. But now I am back to using it with a small hack.
The problem with the latest version as I understand is that the field groups will not show when you edit translation of post/page due to added language parameters in the url.
I applied hack described here: hidden link
Now field groups show up on the translation posts too. But as I posted in the above thread, I got another problem:
When I edit the page/post in original language and click "+" in WPML meta box to add translation, it ends up showing the blank screen. And only if I remove the last part of URL "...&lang=en&source_lang=sv" or even just "&source_lang=sv" then it shows the page. But then in WPML meta box it won't show translation of what this post is until I publish or save the post as a draft.

April 16, 2012 at 2:59 pm #55809


I'm just starting to use these 2 together and I'm noticing that stuff isn't working properly, I'll submit more details as I go.

It would be great to have these 2 awesome plugins working together smoothely.

April 16, 2012 at 6:32 pm #55829


It will be great to make WPML and ACF work together. With that, a multi-lingual powerfull CMS can de done relatively easy.
I dont know if it's possible to make WPML compatible with ACF without making some changes at ACF plugint itself.

- The first annoying thing it's the custom fields are not correctly displayed into the posts or pages. It's only displayed in the default language. This seems to be related to URL lang param, without the param the fields are displayed in every language. (I make this working with a little hack in ACF)

- Another helpful thing would be to copy the content fields automatically between languages as we usually copy the content from the editor. As a starting point to our translations.

- ACF has filters to display the fields based on page template, page name, post type, etc... Some of this filters (like pagename) are not working because WPML has differents ID's for the same entry and ACF has only one ID stored in the filter.

There's a lot stuff to make both compatible but I think the first point could be easy to fix and for me it's the most important.

Thanks to open this topic.

April 16, 2012 at 10:43 pm #55838


Awesome news! Much appreciated - I pay my respects to you for that, especially since it's a kind of competition for your Types plugin.

- I've had two or three sites prepared with ACF, but after I've learned that I needed to make them bilingual I've changed the plugin either ro Custom Field Template or Types (good the sites were quite simple, would be very difficult with some sites I prepare with ACF).

<b>In case when you don't set acf custom post type to be translated:</b>
- Right now, when you create any Field Group (acf post type) ACF custom field boxes only show up in default language - they're called using get_pages function, but they are filtered out by WPML in other langauges)
- Also all the Rules select boxes (where you set where the custom boxes should show up) list only posts/categories/pages from the main language.

<b>Only recently I've realised that we can translate acf post types. Then things start to work.</b>
- Fields start to show with apprioprate posts
- Select lists for rules start to show up on ACF edit screen
The only problem is that all the settings (fields + rules) don't get recreated in any way when you translate acf post. So managing this in several languages would be quite cumbersome. But on the other hand I suppose coding this kind of functionality (syncing of fields and rules between langauges) would be too much.

So I suppose the first thing to agree on is whether we use translated ACFfields or try to make one copy of ACF fields to work for all languages.

April 18, 2012 at 8:42 pm #56120


Great to see your effort to make WPML and ACF work better together!

I've just done my first project with WPML and used ACF for the first time too. They seem to be working quite ok, except for some things. But first this: somehow my setup seems to work a lot better then most other commenters: I do see ACF-fields in translated posts/pages, and they also get copies it I tell them to be copied, so that's allright (except sometimes, see below). The issues I do encounter are:

- when translating (or copying) a post from one language to another, ALL acf database entries get copied for the new post, also the ones that are attached to another post (or post-type) alltogether. With a lot of ACF fields scattered through my site, that messes up the DB a lot.

- When using a 'related'-type field in ACF (so I pick a related post from a select/dropdown) the select or dropdown is populated with all posts in all languages, regardless of the language being edited. But, as I want tot copy the related posts from one language to anohter, I have found the following solution for this: I added the 'suppress_filters'-thing to all get_posts-calls in ACF-plugin, so I just get the default-language posts in my dropdown when editing a post. Secondly, when echoing the results of the get_field() function of ACF I 'manually' retrieve the translated version of the selected default-language version (using icl_object_id) of the selected post (does this still make sense?).

- As I have no desire to translate the ACF-posts -and since I have the idea that translating them messes things up really badly, I decided to hide all WPML-related things on ACF-edit pages (so my editors and co-admins (and myself) can't accidentally translate an ACF-post) Maybe a good idea to make it possible to exclude post_types from WPML on the settings-page?)

- While developing the WMPL/ACF site (It's not even live now), I changed the default language in WMPL somewhere along the way. I have the feeling (but am affraid to try and reproduce it....) that since then the ACF-fields didn't show up in translated or copied posts. Maybe because all ACF-posts were created in the default language? And after changing to another language the 'system' couldn't find them anymore? Even when I copied the ACF-posts to the new default language???) Anyway: some advice to other users: FIRST install WMPL, THEN choose your default language, THEN install ACF and create ACF-posts. DON'T touch default language after that....

I hope some of these comments help in some way, please let me know if I need to explain anything further.
Kind regards,
Henk Jan

April 20, 2012 at 5:22 am #56233


Thanks for all the feedback here. Initially, when we started looking at things, it appeared that WPML and ACF are not working together at all. Now, it looks like the people who have reported that were using very old versions or had other issues.

Moving forward, please create individual threads for each issue. Tag them with 'Advanced Custom Fields' and we'll be able to follow up.

Most of the problems appear to be fixable with configuration. We might need your help reaching the specific configurations that you're explaining, so individual threads per issue would help a lot.

Again, thank you for all the input you provided here.

The topic ‘[Closed] Compatibility with Advanced Custom Fields’ is closed to new replies.