WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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

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

Your Answer


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.