Thursday, 26 December 2013 15:41

Admin setings page in wordpress

Written by 
Rate this item
(0 votes)
You made a cool wordpress plugin and you want to have some settings
for you plugin.To achieve this you have to create a admin settings page
accessible from wordpress admin dashboard.
proceed this way -

add_action( 'admin_menu', 'my_plugin_settings' );

function my_plugin_settings() {  
   add_menu_page('my plugin settings', 'my plugin', 'administrator', 'my_plugin_settings', 'plugin_display_settings');
function plugin_display_settings()
  //menu page related codes

code details : "admin_menu" action will add a setting page at the bottom
of your admin dashboard using add_menu_page function.Then plugin_display_settings
function is used to display items and functionality in your created
setting page ;)

Read 2607 times
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.

Latest discussions

  • No posts to display.