@runofthemill Maintenance of that website is done by somebody else in our company now, bit I have not heard of any issues. Give it a try, but don’t forget to occasionally update!
I have recently moved ACF into mu-plugins on a rather high-traffic site. I’ll let you know about the problems as they arise. I simply put the advanced-custom-fields-pro
directory into the wp-content/mu-plugins
directory and added this modest file to that directory as well:
$ cat advanced-custom-fields-pro.php
<?php
require_once(__DIR__ . '/advanced-custom-fields-pro/acf.php');
The site in question does not need the update mechanism in place as we update the code on another machine, commit to git, and then deploy on the production webserver.
Thank you James, I did not notice that you had replied.
Is there any way to configure this setting _in code_? The idea is that I could distribute my work as a collection of plugins and a themes, and have this option set.
Thank you.
The issue is resolved. For future reference, the name of the filter includes the name or key of the field to which it is to be applied. In the OP example, the name of the filter would thus be:
acf/fields/post_object/query/key=field_b
Obviously, this makes that field’s meta_query
redundant, not that it wored anyway.
Just to be clear: we are using a licensed ACF Pro on this website. The license is registered to my employer, not me personally.
When using get_field()
or the_field()
and the Image ID is returned instead of the expected return value, this is a sign that acf_add_local_field_group()
was not run. Therefore ACF is pulling the raw value from the database but has no way to determine in which format you want it.
To resolve the issue, ensure that acf_add_local_field_group()
is run from the init
hook, not one of the admin_*
hooks.
Thank you John.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.