Digvijay Singh
asked 8 years ago


I need a short bio profile along with the name of the answering user. This functionality is there in Quora also. So say if John Smith who is the CEO if XYZ company replies to any answer then it should look like

“John Smith, CEO of XYZ has answered 10 minutes ago”

Please tell me how can I achieve this functionality.

Thanks for your support.

1 Answers
answered 8 years ago

*For the answer, you can open file : dw-question-answer/templates/content-single-answer.php
go to line 18 and replace the code to:

<?php printf( __( '<span>%s%s %s %s answered %s ago</span>', 'dwqa' ), dwqa_get_author_link( $user_id ), get_avatar( $user_id, 48 ), dwqa_get_author(), dwqa_print_user_badge( $user_id ), get_the_author_meta( 'description', $user_id ) , human_time_diff( get_post_time( 'U' ) ) ) ?>
  • For the question , you can open file : dw-question-answer/templates/content-single-question.php, go to line 19 and replace it with the code of the answer above.

  • For the comment, you can open file : dw-question-answer/templates/content-comment.php, go to line 16, below that, add this code:
    <?php echo get_the_author_meta( 'description', $comment->user_id ) ?>
replied 8 years ago

Thanks a lot Allen…

Powered by DW Question & Answer Pro