Restricting content and parts of a page
Who may see which post is set in the editor via the “Access” box. The section “Post permissions” shows what is set, and what happens if somebody goes to the address anyway. The editor is the right way for one post; for thirty there is the card “Access for many posts at once”, and each post is checked individually to see whether you may edit it.
What a blocked request shows
- “Notice text instead of the content” — empty means a standard sentence that distinguishes between “not signed in” and “wrong role”. Simple HTML is allowed.
- “Page not found (404)” — for content that, from the visitor’s point of view, should not exist at all.
- “Redirect to another address” — for example the sign-in page, or a page explaining how to get access.
Taking restricted content out of lists
With the switch on, posts the visitor may not see disappear from archives, search and feeds. With it off they stay in the list and only the request is blocked — then you see title and excerpt.
Parts of a page depending on the role
For passages in the middle of the text there are shortcodes: one that shows the enclosed part only to users with one of the named roles, and the inverse, which hides it from the named roles. Plus one each for “signed in only” and “guests only” — the latter is the right place for “Sign in now”. The roles are given as slugs, separated by commas; nesting is allowed, and shortcodes inside the enclosed part are still executed.
The media library is a view, not protection
WordPress shows the whole media library to anyone who may upload files — including everyone else’s files. The switch “Everyone sees only their own files” changes that in list and grid view and in the media picker. Exempt are users who may edit other people’s posts, since otherwise an editor could not swap the image in someone else’s post.