I am trying to limit what content the subscribers can see but nothing I do seems to work. I have spent hours trawling the web and through the wordpress code, all to no avail. Does anyone know how I would be able to go about this?
Ideally the code structure would look like:
if(get_role() = 'subscriber'){ redirect }
Thanks
Incidentally i have tried get_role($role) and that doesn’t work for me.
I’ve used current_user_can for this. There’s a list of roles and capabilities here:
http://codex.wordpress.org/Roles_and_Capabilities#Capabilities:_5
So, since everyone above the level of ‘subscriber’ can edit posts, one way to accommodate the requirement you’ve outlined would be: