I’ve been searching and searching for a while now to see if there’s a way to allow people who are logged into my site to make a post as “anonymous” or as their screen name, an ideal additional option would allow comments on that post to be made as anonymous or their screen name as well.
How can I do that?
In order to do what you are asking, there first needs to exist an anonymous user.
Assuming this user exists, there are just a few steps:
1) modify the comment form to include the anonymous check box.
2) detect whether the box is checked.
3) if the box is checked, use the comment_save_pre filter to change the user’s info to that of the anonymous user.
Hope that points you in the right direction!
EDIT: Be sure that you have the comments settings in your dashboard only allowing loggedin users to comment.