Home › Forums › General Issues › How to call ACF fields from my functions.php file › Reply To: How to call ACF fields from my functions.php file
if you have multiple layouts where you use different pieces of the whole file (like gallery)
and wish to edit that pieces not at every single layout then you can maybe put code into a single php file. (galleyloop.php)
and call it there where you need it like that: include_once ('galleyloop.php');
if include_once dont work try include
of course that works only when you call it not outside the loop. but maybe the reason you take it outside the loop was to reuse it at different layouts
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.