Home › Forums › Add-ons › Options Page › Save Options (default values) on theme activation (LITE mode) › Reply To: Save Options (default values) on theme activation (LITE mode)
Your second comment contains the code I would use (if statement), however, I would also use the loop you have developed in your 3rd comment.
It should work.
Perhaps you tested the code when you had a value in the options table? This would cause the if statement to do it’s job and fail the update.
Does that help?
Can you debug the function? ie: print_r and die? This will show you where it gets up to / what the issue is – if any
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!
The most recent ACF Chat Friday featured a live demo of how to register CPTs directly in the plugin, one of our most requested features. Check out the summary below for a replay of the demo, and don’t forget to register for the next session! https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 9, 2023
© 2023 Advanced Custom Fields.