I searched over internet and found a third party plugin. Based on this I have created a plugin through which I can add/edit school names from the WP admin panel. The code is below:
add_action('admin_menu','sinetiks_schools_modifymenu');
function sinetiks_schools_modifymenu() {
//this is the main item for the menu
add_menu_page('Schools', //page title
'Schools', //menu title
'manage_options', //capabilities
'sinetiks_schools_list', //menu slug
sinetiks_schools_list //function
);
//this is a submenu
add_submenu_page('sinetiks_schools_list', //parent slug
'Add New School', //page title
'Add New', //menu title
'manage_options', //capability
'sinetiks_schools_create', //menu slug
'sinetiks_schools_create'); //function
//this submenu is HIDDEN, however, we need to add it anyways
add_submenu_page(null, //parent slug
'Update School', //page title
'Update', //menu title
'manage_options', //capability
'sinetiks_schools_update', //menu slug
'sinetiks_schools_update'); //function
}
But the question is how can I show the schools data in the front end? I know that I need to update the plugin however, no clue for now. Please help.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire