I'm using next_post_link() and previous_post_link() in my theme. I excluded my password protected posts from the loop. They only appear if you enter the URL of this specific post.
But, the problem is that I have next_post_link() and previous_post_link() appearing in every single post. So when I'm in a post that is succeeded or preceded by a password protected post, the password protected post appears in the pagination.
I need to exclude all my password protected post of appearing when using the two aforementioned functions.
I tried using the filters and functions provided in the codex but none of them work the way I need.