add_settings_field example for select field
Closed this issue · 2 comments
Hey @slushman.
Firstly, thanks so much for this project as it has helped me get to grips with the WP Plugin Boilerplate. The lack of documentation on the plugin (so far as I know anyway) made it difficult to get started, but this repo has helped loads!
I'm having trouble creating a select field, specifically with regards to getting the selected value after saving my changes. I was wondering if you or anybody has an example of how to implement add_settings_field
for a select field based on the markup in admin/partials/now-hiring-admin-field-select.php
?
Thanks!
Hey again. Any news on this one?
Oh I'm kicking myself. The select fields weren't saving because for some bizarre reason, at some point when I was working on this, their name wasn't formatted correctly, i.e. background
instead of plugin-name[background]
. Such a simple solution to an obvious error!