Import Questions/Comments and Comments appear as anonymous

4.43K viewsIssues
0

I’m importing questions and comments as the “Questions” post type.  This works great except that the comments are coming across with name as Anonymous (see below).  I know the comments have at least their name.  I’d like for the name to show up at least even though I realize the comment does not have a registered user.  I still want to require registration to comment on the site though outside of the importing of content.  How do I fix this?

Attachments

anon.png
0

By default AnsPress do not allow anonymous comment. But this issue will be addressed in upcoming version 3.0.0 (its already in development).

As a quick fix you can do this:

Override comment.php (Read docs for overriding instructions) and find:

<a href="<?php echo ap_user_link($comment->user_id ); ?>" class="ap-comment-author"><?php echo ap_user_display_name($comment->user_id ); ?></a>

Replace it by:

<?php comment_author(); ?>
You are viewing 1 out of 2 answers, click here to view all answers.