Change WordPress user roles and capabilities Forums Bug Reports User Role restrictions to Categories and CPT has no effect. Reply To: User Role restrictions to Categories and CPT has no effect.

#6689
Vladimir
Keymaster

In order to exclude restricted post from the search results you have to select the action “Show HTTP 404 error”. This option excludes restricted post from all listings.
If ‘Show access error message’ is selected, post is shown at the search results, only its content is replaced with access error message.