Skip to content

Instantly share code, notes, and snippets.

@andyknapp
Created June 20, 2013 02:06
Show Gist options
  • Save andyknapp/5819795 to your computer and use it in GitHub Desktop.
Save andyknapp/5819795 to your computer and use it in GitHub Desktop.
Add a page to the WP admin add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); ?>
add_action('admin_menu', 'ak_menu');
function ak_menu() {
add_menu_page('Page Title', 'Menu Title', 'administrator', 'new-pg', 'ak_menu_content');
}
function ak__menu_content(){ ?>
<div class="wrap">
<h2>Page Title</h2>
<p>content</p>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment