Add the following filter to exclude password-protected posts from the output of a View.
The only edit required is for the ID(s) of the affected Views.
function tssupp_omit_protected_posts( $view_args, $view_settings, $view_id ){ if ( in_array( $view_id, array( 204 ) ) ) { //Edit for IDs of Views $view_args['post_password'] = ''; } return $view_args; } add_filter( 'wpv_filter_query', 'tssupp_omit_protected_posts', 101, 3 );
Let us know if this snippet is not working for you:
This snippet doesn’t work