Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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');
 wp_dropdown_pages($args); 

function to update

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

Help! thx

share|improve this question
add comment

1 Answer

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

$args = array(
'echo'             => 1,
'selected' => $home_galleryselect,
'name'  => 'theme_option[home_galleryselect]');
 wp_dropdown_pages($args); 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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