The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
is it possible to s...
 
Share:
Notifications
Clear all

[Solved] is it possible to show 1.000 comments instead of the abbreviation 1k?

12 Posts
2 Users
2 Reactions
672 Views
Posts: 15
Topic starter
(@flavio-duarte)
Eminent Member
Joined: 2 years ago

Hi, is it possible to show 1.000 comments instead of the abbreviation 1k?

image
11 Replies
Asti
Posts: 7661
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

@flavio-duarte,

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

Posts: 15
Topic starter
(@flavio-duarte)
Eminent Member
Joined: 2 years ago

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 ' ));
});
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

@flavio-duarte,

Please remove this code from the style CSS file:

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'));
});

It's JS code, not CSS. 

Here is a useful article on how to add JS code in WordPress theme: https://www.collectiveray.com/add-javascript-to-wordpress

Posts: 15
Topic starter
(@flavio-duarte)
Eminent Member
Joined: 2 years ago

ok. Can I use it in the hfcm plugin?

image

This error happened, the code appeared at the top of the screen:

image

 

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

@flavio-duarte ,

Try to use the footer value for the "Location" option: https://www.screencast.com/t/EhxAQ2RbKDQx

Posts: 15
Topic starter
(@flavio-duarte)
Eminent Member
Joined: 2 years ago

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

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

ok @flavio-duarte,

You should include the code within <script></script> tags.

Watch this video:  https://www.screencast.com/t/TheSNajEwNVL

Posts: 15
Topic starter
(@flavio-duarte)
Eminent Member
Joined: 2 years ago

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.

image
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

@flavio-duarte,

yes, that's correct. 

Posts: 15
Topic starter
(@flavio-duarte)
Eminent Member
Joined: 2 years ago

Thank you very much. I wish you a great day. Peace and health

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

Ok,  Flavio Duarte,

Thank you for letting us know. Glad to hear that the issue is solved.

We're going to mark this thread as resolved. Feel free to open a new topic if you have further questions.

Share: