Scratching my head on this one. I have a theme option page, where I need the user to select a page to show at X location. I am using wp_dropdown_pages() to list my pages, and they show. But, I can't seem to be able to save the data/option and make sure the correct option is selected.

Page list displaying correctly

$args = array(,
'echo'             => 1,
'selected' => $home_galleryselect,
'name'             => 'home_galleryselect');

function to update

function theme_options_validate($input) {
$input['home_galleryselect'] = (int) $input['home_galleryselect'];
return $input;  

Help! thx

1 Answer 1


grrr.really annoying, 2hrs and then i found it myself

$args = array(
'echo'             => 1,
'selected' => $home_galleryselect,
'name'  => 'theme_option[home_galleryselect]');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.