Knowledge Base

Filter posts (or CPT) which user can't access

in Ajax Search Pro Tips Tags: accessfilterpostsresults

The only way of checking and filtering the posts not accessible by the current user is during the post processing of the search results.

Use the following code in the functions.php file in your active theme directory (copy from line 3):