Issues with select box in options page?
-
i am trying to use selected() function in my select box, inside my wordpress theme options page. The problem is with numbers it works but it is not working comparing strings. Note that below if nothing is selected, automatically default is selected in the select box
Theme Style <select name="corpocrat-options[theme-style]"> <option value="" <?php selected($corpocrat_options['theme_style'],""); ?>>Default</option> <option value="black" <?php selected($corpocrat_options['theme_style'],"black"); ?>>Black</option> <option value="blue" <?php selected($corpocrat_options['theme_style'],"blue"); ?>>Blue</option> <option value="grey" <?php selected($corpocrat_options['theme_style'],"grey"); ?>>Grey</option> <option value="grunge" <?php selected($corpocrat_options['theme_style'],"grunge"); ?>>Grunge</option> </select>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Issues with select box in options page?’ is closed to new replies.