Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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>

Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged: #wordpress #display #post #comment #number
ADD COMMENT
Topic
Name
8+7 =