Check if user has access to post-id
-
Is there a function that checks if the current user is allowed to access a specific post-id?
Background:
I’m coding a separate menu, listing pages from the memberarea. some pages have certain terms set, the terms are restricted to user-roles via Ultimatemember.
This works well, the page is not loading.
But, it’s still being returned when querying via get_posts($args), so it ends up in the menu.
that’s no big deal, but i need to be able to check if the user actually has access in order to either not show that ID in the menu or mark it as not accessible.Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Check if user has access to post-id’ is closed to new replies.