Displaying the number of comments on your load button
-
If you want to include the number of comments in the Load button text, you can use something like:
add_filter( 'llc_button_text', function () { $num_comments = get_comments_number(); if ( $num_comments == 0 ) { $numcomments = __('There Are No Comments'); } elseif ( $num_comments > 1 ) { $numcomments = 'There Are <span style="color:red">' . $num_comments . __('</span> Comments'); } else { $numcomments = __('There Is <span style="color:red">1</span> Comment'); } return $numcomments . '<br />Click to Load »'; });
This is nothing brilliant or complicated, but it might save you a bit of time investigating yourself.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Displaying the number of comments on your load button’ is closed to new replies.