1

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?

3
  • Note that questions for plugin recommendations or job offerings are off topic here, so I took that out.
    – fuxia
    Mar 28, 2013 at 1:42
  • 2
    @tosco - So I guess also an answer that involves a plugin recommendation would be off topic ?
    – krembo99
    Mar 28, 2013 at 2:02
  • You would need to create an anonymous user and then hook into a filter while the comment is being processed.
    – Dan
    Mar 28, 2013 at 5:25

1 Answer 1

1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.