O'Reilly logo

WordPress Plugin Development Cookbook by Yannick Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an administration page menu item in the Settings menu

After defining default values for plugin configuration options, the next step is to create a place where users will be able to view and change these values. By using the WordPress API, we are able to create new items in the administration menu that will later allow us to create custom plugin configuration pages. This recipe shows how to create a new menu item that will appear under the Settings subsection of the administration menu.

Getting ready

You should have already followed the Storing user settings using arrays recipe to have options data available to manage. Alternatively, you can get the resulting code from the downloaded code bundle. You should rename the file ch2-page-header-output\ch2-page-header-output-v3.php ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required