I've created a "theme-options.php" page within Wordpress, that can be found under the WP API "Appearance" settings menu. On this page I would like to include two things from the Settings > General-Options page (the Site Title and Tagline/Subheading) that can be edited here (on my Theme Options page) and saved..
How do I go about achieving this? I have this so far, which displays the boxes and information needed, but does not save/update properly. What is it that I am missing?
theme-options.php :
// Build our Page
function build_options_page() {
// Page Structure
ob_start(); ?>
<div class="wrap">
<?php screen_icon();?>
<h2>Theme Options</h2>
<p><b><label for="blogname"><?php _e('Site Title') ?></label></b></p>
<p><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" class="regular-text" />
<span class="description"><?php _e('The name of your site.') ?></span></p>
<br />
<p><b><label for="blogdescription"><?php _e('Tagline or Subheading') ?></label></b></p>
<p><input name="blogdescription" type="text" id="blogdescription" value="<?php form_option('blogdescription'); ?>" class="regular-text" />
<span class="description"><?php _e('A brief description of your site.') ?></span></p>
<p class="submit">
<input name="Submit" type="submit" class="button-primary" value="<?php esc_attr_e('Save Changes'); ?>" />
</p>
</div>
<?php
echo ob_get_clean();
?>
}