Yep, i know this one, but i want to know if user can view the post. If its an admin page or a group post etc…
This plugin is really handy for logging in as different users/user levels:
https://wordpress.org/plugins/user-switching
Is there a website where functions are listed ?
@ronz
If you are using the User Switching plugin you switch to a user by going to Users > All Users then searching for that user and clicking the switch to link. You can also switch to the user by visiting their profile in the backend or frontend.
I ment doing it with a function in code =)
using the plugin is probably better.
I am doing a list of forums for exemple, and i want to control (in the loop) if current user can access to the forum before showing it in the list.
is the forum private or hidden?? what could disallow them access??
Yep its a forum for a group, all works fine thats just when i list forums they can see forums of groups etc
is it BuddyPress, and its groups feature??
There might be a conditional to use for that too, do not know really where to put the conditional in a template though.
I will come back to this topic after finding out.
Maybe this? Not 100% sure though, if you haven’t contact BuddyPress support.
if ( is_user_logged_in() || bp_group_is_member() )