Textpattern CMS Template Tags

<txp:recent_comments /> sing/cont tag, 3 attributes


The recent_comments tag is a single or a container tag. Textpattern will replace this tag with a list of permanent links to recent comments. This list will be displayed with the format

User’s Name (Article Name)

If used as a container, the tag must be specified as an opening and closing pair, like this:

...contained statements...


sort="posted asc" 
  • Values
    • discussid (comment ID#)
    • parentid (article ID#)
    • name
    • email
    • web
    • ip (IP address)
    • posted
    • message
    • rand() (random)
  • Direction
    • asc (ascending)
    • desc (descending)
limit="10" (integer) 
  • Number of comments to display.
offset="unset" (integer) 
  • Number of coments to skip.


  • Label prepended to item (or as first list item, where appropriate).
  • if wraptag is available and is set to ol or ul, the label will be the first list item.
  • (X)HTML tag (without brackets) to wrap around label.
  • (X)HTML tag (without brackets) or string to separate list items.
  • (X)HTML tag (without brackets) to wrap around the list.
  • (X)HTML class attribute to apply to the wraptag.


Version 4.0.7

  • Can be used as a container tag.
  • offset attribute added.
<txp:recent_comments /> 2 examples

Labeled list of recent comments

<txp:recent_comments label="Recent Comments" limit="25" wraptag="p" break="br" />

Recent comments as an unordered list

<txp:recent_comments label="Recent Comments" wraptag="ul" break="li" /> 

Style for default class could go this way:

.recent_comments {