Hello,
how can i show the amount of questions and answers?
knuppel
1 Answers
If you want to display the question & answer count, you can use the following code and add to the position that you want to show.
<?php
$count_posts = wp_count_posts( 'dwqa-question' );
echo $draft_posts = $count_posts->publish; // Number of publish question
?>
<?php
$count_posts = wp_count_posts( 'dwqa-answer' );
echo $draft_posts = $count_posts->publish; // Number of publish question
?>
Hope this helps !
Please login or Register to submit your answer