11 Replies
Nov 01, 2022 10:29 am
You can use the jQuery code below:Β
jQuery(document).ready(function ($) { jQuery('#wpdcom .wpd-thread-head .wpd-thread-info .wpdtc').text(jQuery('#wpdcom .wpd-thread-head .wpd-thread-info').data('comments-count')); });
Here is a useful article: https://www.collectiveray.com/add-javascript-to-wordpress
Nov 01, 2022 11:26 am
Did not work. Should I put this in the custom css in wpdiscuz's Styles and Colors options? I tried that and it didn't work. I'm also using these other codes for other things
#comments, #wpdcom{ margin:0 auto; max-width: 850px; } #wpdcom .wpd-form-head{ display: none !important; } #wpdcom .wpd-comment .wpd-comment-status .wpd-unapproved{ display:none; } #wpdcom #wpd-threads { margin-top: 0; } #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt { flex-wrap: nowrap; } jQuery( document ).ready( function ( $ ) { jQuery( '#wpdcom .wpd-thread-head .wpd-thread-info .wpdtc' ).text(jQuery( '#wpdcom .wpd-thread-head .wpd-thread-info' ).data( 'comments-count ' )); });
Nov 01, 2022 12:07 pm
I tried it, and now the code appears on the screen at the bottom and it doesn't work to make the number of comments appear without abbreviation. Do you have any other solutions? Thanks
Nov 01, 2022 12:35 pm
It worked now, thanks. I put this code in the header. Is it correct?
<script> jQuery(document).ready(function ($) { $('#wpdcom .wpd-thread-head .wpd-thread-info .wpdtc').text($('#wpdcom .wpd-thread-head .wpd-thread-info').data('comments-count')); }); </script>
Now it is showing the number of comments without abbreviation.
Nov 01, 2022 12:39 pm
Thank you very much. I wish you a great day. Peace and health