Title: Theme options fields won&#039;t save
Last modified: August 21, 2016

---

# Theme options fields won't save

 *  [j4ze](https://wordpress.org/support/users/j4ze/)
 * (@j4ze)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/theme-options-fields-wont-save/)
 * Im making my very first theme, and i’ve come to the part where i want to create
   theme-options.
 * To start with i will just create a custom footer text, I’ve followed some tutorials,
   and i have everything nailed down, but the saving part. It doesn’t seem to save
   my option.
 * Here is my code from functions.php
 *     ```
       function setup_theme_admin_menus() {
           add_submenu_page( 'themes.php', 'Theme Options', 'Theme Options', 'manage_options', 'theme-options', 'theme_options_settings' );
       	}
       	function theme_options_settings() {
       		// Check that the user is allowed to update options
       if (!current_user_can('manage_options')) {
           wp_die('You don't have access to this page.');
       }
       		?>
               <div class="wrap">
               <?php screen_icon(); ?><h2> Theme Settings </h2>
               <form method="POST" action="">
                   <table class="form-table">
                       <tr valign="top">
                           <th scope="row">
       					<label for="footer_text"> Footer Text: </label>
                           </th>
                           <td>
               			<input type="text" name="footer_text" value="<?php echo $footer_text;?>" size="25" />
                           </td>
                         	</tr>
                           </table>
                           <p>
           <input type="submit" value="Save Settings" class="button-primary"/>
       </p>
       <input type="hidden" name="update_settings" value="Y" />
                           </form>
                           </div>
       		<?php
       		if (isset($_POST["update_settings"])) {
           	$footer_text = esc_attr($_POST["footer_text"]);
       update_option("theme_name_footer_text", $footer_text);
       ?>
           <div id="message" class="updated">Settings saved</div>
       <?php
       }
       }
       add_action("admin_menu", "setup_theme_admin_menus");
       ```
   
 * And this is the code from my footer.php
 *     ```
       <footer>
             <?php $footer_text = get_option("theme_name_footer_text"); ?>
   
               <p><?php echo $footer_text ?></p>
             </footer>
       ```
   
 * Another thing is, i can’t seem to get the icon to show in front of the title.
   I used the screen_icon(); function.
 * Hope you can help me

The topic ‘Theme options fields won't save’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [j4ze](https://wordpress.org/support/users/j4ze/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/theme-options-fields-wont-save/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
