I've set up a site for our club. We're using s2member to collect club dues, so the fees are not specifically for website access though that is one of the benefits of club membership. What this means though, is that a few club members need to have limited administrative access to the website. For example our Membership Co-ordinator needs to have read/write access to the Users section.
I have s2member set to block access to wp-admin. I had thought to override that with custom capabilities. I tried:
- Code: Select all
add_action("template_redirect", "ASH_s2ccap",11);
function ASH_s2ccap() {
if(is_admin() && !current_user_can("access_s2member_ccap_admin")){
header("Location: ". S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit();
}
}
in my theme's functions.php file but it had no effect. I have a feeling I need to do something more like:
- Code: Select all
function ASH_s2ccap() {
if(is_admin() && current_user_can("access_s2member_ccap_admin")){
//prevent usual forward from happening
}
}
How can I allow selective access to the Dashboard and make the Admin Bar visible for certain users while still leaving "Member Profile Modifications"=yes?
Thanks,
Jen