Home › Forums › Add-ons › Options Page › get_field options – outside of loop › Reply To: get_field options – outside of loop
This is because no WP or Plugin files are defined if this file is loaded outside of WP. There isn’t any way that you can do what you are attempting to do without also loading WP. The best way to do this is to call and action function using admin-ajax.php. You can load this file without using AJAX and create an action that outputs what you want where you need it output.
https://codex.wordpress.org/AJAX_in_Plugins
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.