Forum Replies Created
-
AuthorPosts
-
February 27, 2014 at 9:07 am in reply to: Do not display previous organizers and venues for event submission? #110241ceramofilesParticipant
That did it thank you!
ceramofilesParticipantGreat! So that code made it so when those users go to the submit events page it gives them an error; however, the events tab still shows up in their admin bar and they can add events if they click events > add event. Is it possible to remove the events tab from the admin bar for only subscribers and our custom role? Thanks!
ceramofilesParticipantThanks for the code. This looks like the right solution; however, when I add it to functions.php, I get some kind of error. The site admin and site display a blank page and when I remove the code through ftp the site displays correctly again. I changed the role and the redirect url. Here is the exact code I used (except for the site url), perhaps there is a php error?:
add_action( ‘wp_head’, ‘community_restrict_access’ );
function community_restrict_access() {
if (tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) {
if(current_user_can(‘subscriber’) || current_user_can(‘pro_member’) {
wp_redirect( ‘http://www.mysiteurl.com’, 301 ); exit;
}
}
}Thanks so much for your help on this!
-
AuthorPosts