Add Events

  • In Progress
    Posted in: BlackFyre  
  • Member
    ripteh1337
    August 25, 2015 at 6:52 pm #66040

    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
    }

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.