get QA History by user_id

Solved4.33K viewsCore
0

Hi,
I have another problem in anspress.
I want to show QA History including questions and answers by user itself when user login the site.
How can I implement it?
Is it possible shortcode?
Thanks.

Question is closed for new answers.
Selected answer as best
0

Hello,
You can get WP_Query by:

$questions = ap_get_questions( ['post_author' => USER_ID]);


Remember to replace USER_ID with the ID of user.
Kind regards

Selected answer as best

Hi, Rahul.
Thanks.
But I want to get not only questions but also answers by user_id,

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