Last active
December 31, 2015 08:28
-
-
Save iwek/7960276 to your computer and use it in GitHub Desktop.
Building a WordPress Plugin Admin Page with a Function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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