Answers for "wordpress get post comment count"

PHP
1

wordpress display post comment number

<?php
  // https://developer.wordpress.org/reference/functions/comments_number/
  function comments_number( $zero = false, $one = false, $more = false, $post_id = 0 ) {
      echo get_comments_number_text( $zero, $one, $more, $post_id );
  }
?>

<span>
  <i class="far fa-comment text-info"></i> 
	  <?php comments_number(); ?>
</span>
Posted by: Guest on June-01-2021

Browse Popular Code Answers by Language