Home › Forums › General Issues › Default values by option page on first load › Reply To: Default values by option page on first load
See the comment in my code above. I don’t know if you should be setting the value to ‘1’ or 1 or true, it could make a difference. any non empty value will result in true in a statement like
if ($value) {
// do something
}
even a value of ‘0’ will return true because it is a non empty string.
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.