Top
Home

Admin Nav Buttons

Add Buttons to the left bar in the admin section of Wordpress.



<?php
/*
Plugin Name: Moose Menu
Plugin URI: http://moosezoo.tumblr.com
Description: Creating Menus on Left Bar
Author: Moose Loose
Author URI: http://example.com
*/


add_action('admin_menu', 'mt_add_pages');
function mt_add_pages() {


//Add a Sub Menu

add_users_page(__('MOOSE BUTTON','Mooser'), __('MOOSE BUTTON','Mooser'), 'manage_options', 'Mooser', 'MooseButton');
function MooseButton() {echo "<h2>" . __('CONTENT', 'Mooser') . "</h2>";}


//Add a Main Menu Item With Sub Pages

add_menu_page(__('Moose Mama','MooseMama'), __('Moose Mama','MooseMama'), 'manage_options', 'MooseMama', 'mooseloose' );
add_submenu_page('MooseMama', __('Moose Baby','MooseMama'), __('Moose Baby','MooseMama'), 'manage_options', 'mooseloose1', 'mooseloose1');
add_submenu_page('MooseMama', __('Et tu','MooseMama'), __('Et tu','MooseMama'), 'manage_options', 'mooseloose2', 'mooseloose2');


}
//Functions that create the page contents

function mooseloose() {include ("chart.php");}

function mooseloose1() {echo "
<iframe name="cwindow" style="border:3px solid 000033" width="1224" height="1150" src="http://www.womc.com"></iframe>
";}

function mooseloose2() {echo "<h2>" . __( 'Et tu?', 'MooseMama' ) . "</h2>";}








//Dashboard - add_dashboard_page
//Posts - add_posts_page
//Media - add_media_page
//Pages - add_pages_page
//Comments - add_comments_page
//Appearance - add_theme_page
//Plugins - add_plugins_page
//Users - add_users_page
//Tools - add_management_page
//Settings - add_options_page