We’ve built a site using Elegant Themes “Divi” theme. We are trying to use ACF to build two different directories of content. We have two specific custom fields to display for Posts of a particular category.
When creating a new post with that designated category, the custom fields display in the right place right below the main content area. After entering the fields and hitting the main WordPress Update button, the custom fields have disappeared on refresh.
If I uncheck and re-check the designated category, the custom fields display once again. However, after hitting Update again, the fields disappear.
We have deactivated all other plugins while using Divi with no effect. Using the default WordPress theme displays the custom fields as usual.
I have contacted Elegant Themes support and they have determined that there is some conflict but have yet to be able to provide me with a solution on their end. The following is the brief info they have given me.
This issue is actually on ACF side. If you switch to the TwentySixteen theme for example, when you load the page the ACF fields display fine but if you try to change the Post Format it will hide all the fields even though the only condition set in ACF is to display the fields according to a category.
So the only reason why the ACF fields don’t show on load with Divi is because Divi triggers a “fake” Post Format change on load.
Thanks in advance for any insight or advice on how to address this issue.
By any chance to you have display of errors turned on? If you do can you turn off display errors and see if that corrects the problem? I you turn on error logging do you see any errors from ACF in the error log?
This is just a guess but there could be a PHP error during the AJAX request that’s that is triggered for ACF to check if the field groups should be active or not. If there is an error then basically all checks return false and that causes all of the field groups to be removed.
Let me know if you need more information about php error and the WP error log.
I just checked wp-config to see if debug was ON. Interestingly Debug was not defined at all.
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
define( ‘WP_DEBUG_LOG’, true );
and then after going through the steps in the admin to use ACF I looked in the error logs and there is nothing related to ACF in there.
Where there any PHP errors and did this have any effect on if ACF showed the fields or not?
I tried setting up the field groups as you indicated in the OP and using them with the TwentySixteen theme as suggested by the message you got from Divi. I am unable to recreate the the effect that you describe. Everything seems to be working as expected.
I added a link. This forum is a user support forum meaning users helping users. Other users that know a bit about the plugin answer questions when they can, some more than others.
At the top of new topic page there was this message:
Please note that forum topics are no longer used as support tickets. Instead, please open a support ticket
I am also seeing this issue.
I created a ‘Messages’ Field Group, into which I created two fields, and Location is configured with the following Rule:
[Post Category] [is equal to] [Messages]
While creating the Post, I see the Advanced Custom Fields’ ‘Messages’ Field Group as soon as I assign the ‘Messages’ category. And, while the Edit Post page is loading, I also see the ‘Messages’ Field Group. But as soon as the page loads, the Divi Builder loads, and the ‘Messages’ Field Group disappears.
Switching the Location from
[Post Category] [is equal to] [Messages]
[post_type] [is equal to] [post]
re-enables the ACF ‘Messages’ Field Group again.
Going back to my statement above, any PHP error that happens during the AJAX call can cause it to return false. The error does not need to be associated with ACF. Even if you do not have display of errors turned on some errors can cause script execution to be terminated which can cause the AJAX request to fail.
See my comment above about looking for errors. If there are errors in the log then the solution is to clear up what is causing them.
I was having the same problem. On closer inspection of the WP editor it appears that the Divi Builder is hiding the default editor as well as the AFC fields if the position is set to High (under title). Setting the AFC position to normal means the AFC fields now show under the Divi Builder.
this problem is still existent.
I really like my customs field to be at the very top of the page for easy access.
The topic ‘ACF not compatible with Divi Theme?’ is closed to new replies.
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!