Extending the theme options page can be great if you’re looking to create a custom-tailored admin experience for your client. But before we dive into this, let’s discuss how the theme options page actually works and how we refer to the different parts.
Before we do any kind of customization to the theme options page, it’s important to understand the terminology we use to refer to the various components of it.
At the top-level, we have tabs, which contain sections of options. Now, this may be obvious, but as we move through the other articles about customizing the theme options page, knowing these exact terms will be helpful.
What You Can Customize
Now that you understand the exact terminology, we can better put what you can actually customize into perspective. If you’re looking to edit an option or create a new option, you can do that; however, that option will need to have both a section and a tab.
So if you want to edit an existing option, you need to know not only the option ID, but the ID of the section and tab that option belongs to. Also, if you want to add a new option, you need to know the ID of a section and tab, in which you want to add that option to.
This all adds an extra step for developers, but keep in mind that all of the API functions that you’ll be using to modify your theme options page are be executed at the runtime of your website. So, by specifying the specific section and tab of an option, it allows for much less server-side work of modifying these giant arrays of data.
How Theme Options Are Saved
If you’re getting serious about modifying these options from your child theme, it’s going to be important for you to understand how they’re actually saved.
The entire page of options are saved as a single array to standard, single WordPress option. This means, that if you wanted, you could use the core WordPress function,
get_option() to pull down the entire array. Of course, we have a more efficient way to retrieve the value of a specific option, which is covered here.
So, in other words, the entire array of this data could be retrieved like this:
$settings = get_option('jumpstart');
For more about how the theme options are actually saved and filtering the ID they’re saved to the options table in the WordPress database, see the following article: