The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Show Comment number...
 
Share:
Notifications
Clear all

[Solved] Show Comment number in other post type

3 Posts
2 Users
0 Reactions
918 Views
Posts: 12
Topic starter
(@hai991dk)
Eminent Member
Joined: 4 years ago

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>
Topic Tags
2 Replies
Asti
Posts: 7212
 Asti
Support
(@asti)
Illustrious Member
Joined: 6 years ago

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>
1 Reply
(@hai991dk)
Joined: 4 years ago

Eminent Member
Posts: 12

@asti it working, thanks team

Share: