I have many user contactmethods on my Profile page. If the user has not completed them all, then every time they log in they are supposed to be redirected to a "Reminder" post. But I want to hide this Post everywhere else. I have a pre_get_posts function which performs this action:
$query->set( 'post__not_in', array( 639 ) );
which does a fine job of hiding Post number 639 everywhere. The problem is that when I execute the login_redirect filter (which verifies that the required fields are finished), and it finds that the user's profile is incomplete, the redirect to the "Reminder" post results in a 404-Not Found error (because it has been excluded from WP_query - duh).
I understand that I'm causing my own problem, but I don't know how to get out of it. How can I hide a Post everywhere except for when it is called specifically?