Display post author’ answers

5.02K viewsGeneralUser answers
0

I would like to show the answers done by the author of the current post. Is that possible? Is there a shortcode for that?

Unselected an answer
0

No shortcode available but it can be done using PHP.

  global $answers;
  $user_id = ap_current_user_id();
  $args['ap_current_user_ignore'] = true;
  $args['ignore_selected_answer'] = true;
  $args['showposts']              = 10;
  $args['author']                 = $user_id;
  if ( false !== $paged ) {
   $args['paged'] = $paged;
  }
  anspress()->answers = $answers = new \Answers_Query( $args );
  ap_get_template_part( 'addons/user/answers' );

Unselected an answer
You are viewing 1 out of 2 answers, click here to view all answers.