Home › Forums › Calendar Products › Community Events › Hide Events Tab from Subscribers' WP Dashboard/Admin
- This topic has 5 replies, 3 voices, and was last updated 11 years ago by
Support Droid.
-
AuthorPosts
-
March 11, 2015 at 9:21 pm #947803
Peter Hoppe
ParticipantHi, 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,
PeterMarch 11, 2015 at 9:22 pm #947804Peter Hoppe
ParticipantFYI: 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
March 11, 2015 at 10:00 pm #947808Gustavo Bordoni
KeymasterHi 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,
March 12, 2015 at 9:27 am #947914Peter Hoppe
ParticipantYeah, 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’ );March 12, 2015 at 9:24 pm #948063Gustavo Bordoni
KeymasterHi 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,
July 7, 2015 at 6:31 am #983855Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Hide Events Tab from Subscribers' WP Dashboard/Admin’ is closed to new replies.
