Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $num_comments = get_comments_number();
- $num_comments = get_comments_number(); // for some reason get_comments_number only returns a numeric value displaying the number of comments
- if ( comments_open() ){
- if($num_comments == 0){
- $comments = __('No Comments');
- }
- elseif($num_comments > 1){
- $comments = $num_comments. __('Comments');
- }
- else{
- $comments ="1 Comment";
- }
- $write_comments = '<a href="' . get_comments_link() .'">'. $comments.'</a>';
- }
- else{$write_comments = __('Comments are off for this post');}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement