perch_comments_count

A count of ‘live’ comments can be output using perch_comments_count()

Requires

Parameters

Type Description
String A slug or other identifier for the thing being commented on
Boolean Set to true to have the value returned instead of echoed.

Usage examples

Displays a count of the comments added to the item identified by product123.

<?php perch_comments_count('product123'); ?>

Return the value by passing in true.

<?php $count = perch_comments_count('product123', true); ?>