I'm working on a settings section for my plugin, and after reading over Wordpress's documentation which is in ROGUH DRAFT status, and also the Creating Options Pages - which is also in "transition", I've been left with questions about how to correctly use the new Settings API to add an options page for my plugin.

I have around 30 plugins installed and did a search for the keywords register_setting, add_settings_section, & add_settings_field and only found one match as part of Coffee2Code's plugin framework - for which I can't find any documentation anywhere.

Can someone give me a working example, or provide a link to a simple working example, of how I should use the new "Settings API" to create a simple options page for my plugin?

2 Answers 2


I wrote a tutorial for Incorporating the Settings API in WordPress Themes.

The only real difference for Plugins is that you'll use add_settings_page() instead of add_theme_page(). The rest should pretty much be the same.

  • has a couple typos in some of the code and functions but overall very helpful. thanks!
    – cwd
    Commented Jan 26, 2012 at 7:23

There is an other good tutorial at WPTuts+: Using The Settings API.

Part 1 – Create A Theme Options Page

If you create your own themes you will, sooner or later, want to allow your theme users have some control over certain appearance and/or functional elements of your theme. When this time comes you will want to use the powerful WordPress Settings API. With it, your code becomes simpler, more efficient and more secure.

Part 2: Create A Top Level Admin Menu

This is Part Two of “Create Theme Settings Pages that use the Settings API” tutorial. In this part, we will be looking into how we can create a top level admin menu with more than one settings pages as well as how we can add tabs when we need them. If you have not yet had the chance to read Part One, you may want to do that first before you continue. This tutorial builds on the code shown in the first part of this tutorial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.