Skip to content

Instantly share code, notes, and snippets.

@iwek
Last active December 31, 2015 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save iwek/7960276 to your computer and use it in GitHub Desktop.
Save iwek/7960276 to your computer and use it in GitHub Desktop.
Building a WordPress Plugin Admin Page with a Function
<?php
add_action('admin_menu', 'plugin_admin_add_page');
function plugin_admin_add_page() {
add_options_page('Custom Plugin Page', 'Custom Plugin Options Page', 'manage_options', 'page_slug', 'plugin_options_page'); //settings menu page
}
function plugin_options_page() {
//HTML and PHP for Plugin Admin Page
echo "<h2>The Custom Plugin Options Page</h2>";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment