As you can see in the image, I have assigned
student level 1 to a Page in WP admin. I am building a custom
page.php on my own and I am trying to redirect the user back if they were not added.
I try with
But obviously, all users and read a Page. What I am tryint to accomplish is somethinng like
current_user_is_in_content_permissions() ? display() : redirect_back();
How can write the code in my
WP automatically displays
Sorry, but you do not have permission to view this content.