Aug 13, 2021 3:40 am
Hello team!
I'm using the "DW Question & Answer" plugin, but I disabled the "Answer/Comment" feature of this plugin to use comment feature of WPdiscuz plugin.
So I want to show exact number of comments based on WPdiscuz plugin.
Below is the code that shows the comment number of the DW Question Answers plugin, but it is not working correctly.
Please fix it to suit WPDiscuz, many thanks team, I enjoyed using the WPdiscuz plugin.
<span class="dwqa-answers-count"> <?php $answers_count = dwqa_question_answers_count(get_the_ID()); ?> <?php printf( __( '<strong>%1$s</strong> answers', 'dwqa' ), $answers_count ); ?> </span>
2 Replies
Aug 13, 2021 10:25 am
Hi @hai991dk,
Please try this code:
<span class="dwqa-answers-count"> <?php $answers_count = dwqa_question_answers_count(get_the_ID()) -> get_comments_number(get_the_ID()); ?> <?php printf( __( '<strong>%1$s</strong> answers', 'dwqa' ), $answers_count ); ?> </span>