how to use add_settings_error() for nested options array
-
Hi All,
I’m building a theme with custom-options using Otto’s fantastic tutorial on the WordPress settings API as a basis for my custom theme options.
I have registered a new setting:
iblaunchy_options
and all of my theme’s settings are stored inside of this option:register_setting( 'iblaunchy_options', 'iblaunchy_options', 'iblaunchy_options_validate' );
I’m currently working on the validation function, and would like to be able to display errors on the options page if one of the options in my validation function fails to pass.
I’m not sure how to do this. I read up on the codex for add_settings_error and settings_errors but am still unsure how to proceed.
Has anyone come across a good explanation of how to use these settings api functions to display errors back to an options page built using the method in Otto’s tutorial?
I’m just not sure how to show errors for these settings because they are nested within the
iblaunchy_options
setting.Any ideas?
Thanks,
Greg J
- The topic ‘how to use add_settings_error() for nested options array’ is closed to new replies.