Title: Using the settings API
Last modified: August 20, 2016

---

# Using the settings API

 *  [miocene22](https://wordpress.org/support/users/miocene22/)
 * (@miocene22)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/using-the-settings-api/)
 * I’m trying to create a settings page for my theme using the settings API.
    For
   learning I am applying it to the twentyten. I’ve created an “options” folder 
   in the theme folder and have added an options.php which I include from functions.
   php.
 * I have the options page working and I generate the fields by using php to generate
   the html from an array of all my options fields.
 * It all works great but when I click save it just takes me to a page of all the
   possible wordpress options on one page and does not seem to save my options.
 * I’ve put my code in the pastebin. If someone could tell me if I’m missing something
   that’ll be great.
 * [http://pastebin.com/vp9GjURa](http://pastebin.com/vp9GjURa)
    sorry it’s quite
   long but I’m hoping skilled coders can figure it out.

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/using-the-settings-api/?output_format=md)
[1](https://wordpress.org/support/topic/using-the-settings-api/?output_format=md)
2

 *  Thread Starter [miocene22](https://wordpress.org/support/users/miocene22/)
 * (@miocene22)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/using-the-settings-api/page/2/#post-2077904)
 * Yes but doesn’t seem to work. The variable is only set for files in which it 
   is defined, except for functions.php which defines it in all “main body files”
   like index.php, page.php, single.php etc.

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/using-the-settings-api/?output_format=md)
[1](https://wordpress.org/support/topic/using-the-settings-api/?output_format=md)
2

The topic ‘Using the settings API’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 16 replies
 * 3 participants
 * Last reply from: [miocene22](https://wordpress.org/support/users/miocene22/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/using-the-settings-api/page/2/#post-2077904)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
