Get solved and answered count?

Solved4.62K viewsGeneral
0

Hi there,
I am trying to get the solved and answered questions to display in a custom theme but without any luck.I managed to get the users and total questions from the standard wordpress api using wp_count_posts().

Does anyone have a example on how to use ap_answer_get_the_count() ??

selected answer
1

Holla Howard,
wo_count_posts() is not a proper function to count AnsPress posts, instead use ap_total_posts_count or use short one ap_total_published_questions or use ap_total_solved_questions()

ap_answer_get_the_count works only inside loop. Use ap_total_posts_count for counting answers as well. Check the link for more detail of arguments.

Posted new comment

Awsome,thanks!
That link was just what I needed.

where is the link?

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