…2 ); function rlv_search_exclude_protected( $allow, $post_id ) { $post = get_post( $post_id ); if ( ! empty( $post->post_password ) ) { $allow = false; if ( is_user_logged_in() ) { $allow = true; } } return $allow; } Now protected posts are not shown to searchers who are not logged in….A site I’m working with has a handful of “protected” posts (password required to view). For various reasons, we don’t want to show these in search results. While there is no excerpt shown, I’d prefer for people to not even know they exist. Relevanssi sees protected posts as public posts……(because their post status is publish, not private like with private posts). That’s what they are, as, in general, users will be able to see protected posts. Just not their content unless they know the password. Relevanssi does protect the content and won’t show parts of it in excerpts. If…