perch_comment()

A single comment can be displayed using perch_comment().

Requires

Parameters

Type Description
Integer ID, the id of the comment to display
Array Options array, see table below
Boolean Set to true to have the value returned instead of echoed.

Options array

Name Value
template The name of an HTML template file in the templates/comments folder.

Usage examples

A single comment can be displayed using perch_comment()

<?php perch_comment(4); ?>

Pass in a custom template using an options array.

<?php perch_comment(4, array(
  template => 'my_template.html'
)); ?>

Return the value by setting the third parameter to true.

<?php
  $comment = perch_comment(4, array(
  template => 'my_template.html'
),true);
?>