Create WordPress admin menu

If you want to add menu in wordpress or create a WordPress plugin that need to allow users to change settings from the WordPress dashboard. Adding a WordPress admin menu you allow users to customize your plugin to according to their needs.

Create WordPress admin menu link

for easily access our plugin setting we create an admin menu in the dashboard. This menu should have fields where users can customize your plugin to fit their exact needs.
webtechsource custom menu Create WordPress admin menu
we will Use the WordPress function “add_action” along with “admin_menu” Then pass the function name of your menu.

Function we used for adding menu:


Parameter Info :

$page_title :
The text to be displayed in the title tags of the page when the menu is selected.

$menu_title :
The text to be used for the menu.

$capability :
The capability required for this menu to be displayed to the user.

$menu_slug :
The slug name to refer to this menu by. Should be unique for this menu page and only include lowercase alphanumeric, dashes, and underscores characters to be compatible with sanitize_key().

$function :
function is the callback for the function you want to render your actual page.

$icon_url :
The URL to the icon to be used for this menu.

$position :
This is an integer that determines where (height-wise) in the left sidebar your option should appear, 1 being the top, 99 being the bottom.

webtechsource menu position Create WordPress admin menu

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face – we are here to solve your problems.

I, Dayanand Saini,the founder and chief editor of,have been working as a software engineer from last 4+ years. It's my hobby to learn new things and implement on live environment.

Leave a Reply

Your email address will not be published. Required fields are marked *

47 − = 45

%d bloggers like this: