The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How to show the cou...
 
Share:
Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpDiscuz community!

Merry Christmas and Happy Holidays! πŸŽ„

[Solved] How to show the count of the comments left on the "Load more" button.

1 Posts
1 Users
0 Reactions
4,742 Views
Asti
 Asti
(@asti)
Illustrious Member Support
Joined: 8 years ago
Posts: 8204
Topic starter  

Started from the wpDiscuz 7.3.10 version we've added two new hooks:

The wpdiscuz_show_comments_left is designed for showing the count of the parent comments left on the "Load more" button. By default, the count is not displayed. If you want to show it, just put the hook-code below in the active theme functions.php file:Β 

add_filter("wpdiscuz_show_comments_left", "__return_true");

This video shows how the hook-code works:

The second wpdiscuz_comments_left_text hook allows you to change the text, that displays the number of the parent comments that are not displayed yet on the "Load more" button. This is not required, you can use it just in case if you want to change the text.

For example:

add_filter("wpdiscuz_comments_left_text", function ($text, $args) {
    if (!empty($args["comments_left"])) {
        $text = "[{$args["comments_left"]}]";
    }
    return $text;
}, 10, 2);

In this case, the default (X) format will be replaced with [X].

hook result

This article describes how to easily add custom code in WordPress: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

Β 


In case you want to say thank you! πŸ™‚
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.


   
Share: