Hide Events Tab from Subscribers' WP Dashboard/Admin

Home Forums Calendar Products Community Events Hide Events Tab from Subscribers' WP Dashboard/Admin

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #947803
    Peter Hoppe
    Participant

    Hi, how can I disable/hide the Events tab in the WP dashboard for logged in subscribers. (It should still show of course for admins.) I only want subscribers to be able to submit community events via the front-end.

    (I have v3.9.1 of Events Calendar and 3.9 of Community Events)

    Thanks,
    Peter

    #947804
    Peter Hoppe
    Participant

    FYI: I have found the tutorial for hiding the Events tab from the Admin Top Bar, but nothing for removing it from the sidebar (next to Profile and Dashboard).

    Peter

    #947808
    Gustavo Bordoni
    Keymaster

    Hi Peter,

    Thanks for reaching out to us.

    There are a few ways to accomplish it, but they will require PHP and WordPress knowledge.

    I would suggest you to go with the Admin Menu Editor, a plugin that I find very useful when I have to hide something from a certain type of users on my own sites.

    It’s pretty cool, just install it and you can hide whatever menus you need from a specific type of user.

    My Best Regards,

    #947914
    Peter Hoppe
    Participant

    Yeah, I prefer not to keep adding plugins when a little code to functions.php will do the trick. Here’s what I added for now – it’s not perfect but hides the tab for now. Is there a way I can improve this? While this code hides the tab, there is still a small gap between the Dashboard and Profile tabs.

    function scents_remove_events() {
    if ( !current_user_can( ‘manage_options’ ) ) {
    remove_menu_page( ‘edit.php?post_type=tribe_events’ );
    }
    }
    add_action( ‘admin_init’, ‘scents_remove_events’ );

    #948063
    Gustavo Bordoni
    Keymaster

    Hi Peter,

    I’ve crafted a small plugins based on the code you provided me. Just access the URL and follow the instructions there and you should be good to go.

    https://github.com/bordoni/tec-forum-support/tree/plugin-947803

    PS: This plugin acts as a <b>functions.php</b> snippet, but with the power of the “Activation” from WordPress.

    My Best Regards,

    #983855
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Hide Events Tab from Subscribers' WP Dashboard/Admin’ is closed to new replies.