Checking checkbox
-
Hi, I’m developing a WP theme and recently I’ve encountered a problem which is quite annoying. I have created a custom theme options page where users are able to use checkboxes and everything works fine, BUT let’s say I set default checkbox value to checked(1, true) and when I load options page it shows it’s checked, but wordpress is giving me a false value when I try to test it. It appears that unless I actually press “Save” button default values of checkboxes are not saved into database. Should I add a function which writes default checboxes values to database if they’re not present or is there any other more elegant way?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Checking checkbox’ is closed to new replies.