I’m trying to learn OO WP programming, and have created a CPT factory that creates a Project. Within this Project I want to use acf fields. However, when I call the function exists acf_add_local_fieldgroup, it returns false.
My plugin uses namespaces (somebody told me that was a smart idea). I cannot find anything about ACF namespaces.
You cannot call acf functions until ACF is loaded. If you are trying to call this is the setup of your plugin before acf is loaded. In plugins you need to have these thins set up on the acf/init hook to ensure ACF is loaded.
Viewing 2 posts - 1 through 2 (of 2 total)
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