Answers for "comments count wordpress"

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
0

wordpress show all comment

on your template add this to use globle template

global $withcomments; $withcomments = true;


in while loop use this display your comment
{
comments_template( )
}
Posted by: Guest on July-15-2021

Browse Popular Code Answers by Language