On my site I have a number of post category archive pages. What I would like to do is set it up so that when links to specific posts are clicked on these pages the user is sent to the post only if they are logged in. Otherwise they would be sent to the login/sign up page.
I don't want the articles themselves to be restricted, meaning if somebody found a link outside my site to the post they would be able to view it without logging in. I only want access restricted when the user is coming directly from an internal archive page.
Thank you for your help.