settings API dropdown list to select page
-
hi there i’m attempting to difine a function that will display a dropdown list of the pages on my wordpress site – currently my functions.php file resembles closely to otto’s wordpress settings API tutorial found here.
currently i am using the following function to display a dropdown list and am able to get it to populate the <select> tag with my pages however when i chose the page and submit it the option does not save to my database.
function setting_dropdown_fn() { $options = get_option('rtms_options'); $args = array( 'depth' => 0, 'child_of' => 0, 'selected' => 0, 'echo' => 1, 'name' => "rtms_options[Page_string]", 'id' => "dropdown") ; wp_dropdown_pages( $args ); }
any advice on where i’m going wrong or where i need to be looking into would be very helpful – as i said before i’m trying to now save the populated list selection to my database
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘settings API dropdown list to select page’ is closed to new replies.