I am making a custom plugin for wordpress and i need to create a page in the admin menu. I already have a file called menu_list.php with the following code:
function jps_mail_list_page_entry() {
add_menu_page(
__('JPS Mailing List'),
'JPS Mailing List',
'manage_options',
'jpsNews_mailinglist',
'jpsNews_mailing_list',
'dashicons-email'
);
}
add_action('admin_menu', 'jps_mail_list_page_entry');
function jpsNews_mailing_list() {
echo 'hello';
}
Now, in the plugin page i have this:
function jpsNews_activate_plugin() {
include_once(plugin_dir_path(__FILE__).'pages/mailing-list.php');
}
register_activation_hook(__FILE__,'jpsNews_activate_plugin');
Its not working. How can i do it?