Home › Forums › ACF PRO › Question set Global variable ACF › Reply To: Question set Global variable ACF
If you’re going to use alternates when no value is entered then you need to do something. Most of the time I just code it where I’m getting the field, but a function like you show does the same thing. Actually, with a function, if you have all of these default values functions in one file it will make edits easier, so it’s not a bad idea. I’m probably a bit different than other developers, when I always try to do things in ways that will make it easier to maintain or change in the future and it’s what I use to decide what to do.
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.