Hi Elliot,
I recently downloaded the Location Field from GitHub to include in my theme. It appears that the action to register the field is never being fired.
Please see the issue I have outlined in the repo: https://github.com/elliotcondon/acf-location-field/issues/17
Basically, if if I include the include_once('location-v4.php');
in the construct function the location field appears. Otherwise, it doesn’t show up in the latest version of ACF. This tells me that the add_action('acf/register_fields', array($this, 'register_fields'));
is never firing.
Any help is most appreciated!
Hi @devinwalker
You say that you are including the location field within your theme. Have you tried using it as a WP plugin? Does it work in this state?
Looking at the README it seems like there are incorrect instructions to use the add-on within your theme.
In your functions.php file, just include the add-on like so:
include_once('acf-location/acf-location.php');
Does that fix the issue?
Yes the instructions in the readme should be updated to just include the file – or perhaps use if file_exists include(…); thanks for the resolution!