-
Hello, I currently use Event Organizer and only way to add events is in the admin dashboard or by using the admin bar. I know recent release disabled that admin bar but i need that to display for only adding events for people. What’s best way to do this?
Below is the code
/*hide admin bar for all users except admin*/
function skywarrior_admin_bar(){if (!current_user_can(‘administrator’) && !is_admin()) {
show_admin_bar(false);
}}
add_action( ‘after_setup_theme’ , ‘skywarrior_admin_bar’);/*remove menus for non admins*/
function skywarrior_remove_menus(){if (!current_user_can(‘administrator’)) {
remove_menu_page( ‘index.php’ ); //Dashboard
remove_menu_page( ‘edit.php’ ); //Posts
remove_menu_page( ‘upload.php’ ); //Media
remove_menu_page( ‘edit.php?post_type=page’ ); //Pages
remove_menu_page( ‘edit.php?post_type=slider’ ); //Slider
remove_menu_page( ‘edit.php?post_type=clan’ ); //Clans
remove_menu_page( ‘edit.php?post_type=pricetable’ ); //Pricetable
remove_menu_page( ‘edit-comments.php’ ); //Comments
remove_menu_page( ‘themes.php’ ); //Appearance
remove_menu_page( ‘plugins.php’ ); //Plugins
remove_menu_page( ‘users.php’ ); //Users
remove_menu_page( ‘tools.php’ ); //Tools
remove_menu_page( ‘options-general.php’ ); //Settings
}
-
Please use the search before making a post. Your question maybe be already answered!
-
Do you need customization work? Are you having trouble installing Wordpress? Feeling lazy and want somebody else to do the hard work for you?
Join our discord!
Need hosting?
Follow us!