WordPress does not come with specially designed pages for plugin options. We can either use the admin menu page or the options page to make the HTML forms required for configuring options. I am going to use the admin menu page to implement the options. First we have to use the following code to add the page to the left menu.

add_action(‘admin_menu’,’pro_admin_menu’);

function pro_admin_menu() {

add_menu_page(

“Donation”,

“Donation”,

8,

__FILE__,

“pro_admin_menu_list”,

PRO_URL.”/images/shopping_cart.png”

);

add_submenu_page(__FILE__,’Doners’,’Doners’,’8′,’doner-list’,’doner_listings_site’);

}

We have to use the action called admin_menu to add a new menu item and pro_admin_menu is the name of the function to add the page. Inside the function we can use the built-in add_menu_page to create the menu item.


0 thoughts on “WP Admin Menu”

Leave a Reply

Latest Article

Blog

Check Attachment Existence WordPress Tutorial

If you want to CHECK the same attachment name exists already before creating a new one or before inserting the attachment into the DB, you can use the following method: // check if attachment already Read more…

Blog

How to Create a Custom Page in WordPress

First, you need to open a text editor  add the blank file add this line of code at the top: <?php /* Template Name: Custom Page Template */ ?> Editing Your Custom Page Template Your Read more…

Blog

How to add user profile image by custom URL and custom fields in woocommerce

If you want to add user profile image by custom URL and add custom fields of profile image like first name, last name in your woo-commerce registration form then see our code below, you can Read more…