get QA History by user_id

Solved3.71K 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,

0

Thanks for your quick response.
I will try it and update you.
Best regards.

Unselected an answer