Anatomy Of A WordPress Plugin: Adding Admin Menu For Options Page

WordPressAll but the most simple of WordPress plugins will require an options page in the Admin area which will need to be made accessible to the admin users. The main way this would be done is to add an entry to the admin menu.

This is done using the add_action function with the admin_menu hook to call a custom function.

This custom function then uses the add_options_page function to add the options page to the Settings menu.

The code below is from my RSS Suffix plugin where a menu option called azurecurve RSS Suffix is calling a function called azc_rss_config_page:

add_action( 'admin_menu', 'azc_rss_settings_menu' );

function azc_rss_settings_menu() {
	add_options_page( 'azurecurve RSS Suffix'
						,'azurecurve RSS Suffix'
						, 'azc_rss_config_page' );

Continue reading