Home › Forums › General Issues › use get_field in other plugin to get a custom post field › Reply To: use get_field in other plugin to get a custom post field
For anyone searching…
Although in most cases it’s probably better to include ACF in your plugin, you might have a situation where you know for a fact ACF is already present and you just want access to its functions.
In your plugin, you can run your kickoff function on acf/init
like so:
add_action( 'acf/init', 'run_my_plugin' );
That will ensure your plugin runs after ACF has loaded, so you will have access to ACF’s functions.
Docs: https://www.advancedcustomfields.com/resources/acf-init/
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.