Site Management

Comments

5 min read

> **What you'll learn:** How to enable comments on posts, moderate submissions, and configure comment behavior.

Time: ~5 minutes


Overview

TallCMS includes a native comment system for blog posts. Visitors can leave comments on published posts, and you manage them through the admin panel.

Key features:

  • Guest and authenticated commenting
  • Nested replies with configurable depth
  • Spam protection (honeypot + rate limiting)
  • Per-post-block toggle
  • Manual or auto-approve moderation
  • Email notifications for new comments and approvals

1. Enable Comments on a Page

Comments appear on individual post pages rendered by a Posts block.

  1. Go to Admin > Content > Pages
  2. Edit the page that contains your Posts block
  3. Click the Posts block to open its settings
  4. Under Display Options, toggle Show Comments on
  5. Click Save

Comments now appear below each post when a visitor views it.

Note: Comments only display on published posts. Draft, pending, and scheduled posts do not show the comment section.


2. Moderate Comments

Navigate to Admin > Content Management > Comments. The navigation badge shows the number of pending comments.

Status Tabs

TabShows
AllEvery comment regardless of status
PendingAwaiting your review
ApprovedVisible on the frontend
RejectedHidden from the frontend
SpamFlagged as spam

Approve or Reject

Single comment:

  1. Click a pending comment to view it
  2. Click Approve, Reject, or Mark as Spam in the header

Bulk moderation:

  1. Select multiple comments using the checkboxes
  2. Use the Bulk Actions dropdown to approve, reject, or mark as spam

Soft Delete & Restore

Deleted comments move to the trash. Use the Trashed filter to view and restore them.


3. Configure Comment Behavior

All comment settings live in config/tallcms.php under the comments key.

Moderation Mode

'comments' => [
    'moderation' => env('TALLCMS_COMMENTS_MODERATION', 'manual'),
],
ValueBehavior
manualAll comments require admin approval before appearing (default)
autoComments appear immediately without review

Guest Comments

'guest_comments' => true,

When true, visitors can comment without logging in by providing a name and email. When false, only authenticated users can comment and a login link is shown.

Nesting Depth

'max_depth' => 2,

Controls how deep reply threads can go:

ValueResult
1Top-level comments only, no replies
2One level of replies (default)
3Replies to replies

Rate Limiting

'rate_limit' => 5,
'rate_limit_decay' => 600,

Limits each IP address to 5 comments per 10-minute window. Adjust both values to suit your traffic.

Content Length

'max_length' => 5000,

Maximum characters per comment.

Global Kill Switch

'enabled' => env('TALLCMS_COMMENTS_ENABLED', true),

Set to false to disable comments site-wide. This overrides the per-block toggle — no comment forms render and the submission endpoint returns 404.


4. Notifications

New Comment Notifications

When a comment is submitted (in manual moderation mode), all users with the Approve:CmsComment permission receive a notification via the configured channels.

'notification_channels' => ['mail', 'database'],

Database notifications appear as Filament notifications in the admin panel. Mail notifications link directly to the comment in the admin.

Approval Notifications

When you approve a comment, the commenter receives an email with a link to their comment on the post.

'notify_on_approval' => true,

Set to false to disable approval emails.


Configuration Reference

KeyDefaultDescription
enabledtrueMaster switch for the comment system
moderationmanualmanual or auto
max_depth2Maximum reply nesting depth
max_length5000Maximum comment length in characters
rate_limit5Max comments per IP per window
rate_limit_decay600Rate limit window in seconds
notification_channels['mail', 'database']Channels for new comment alerts
notify_on_approvaltrueEmail commenter when approved
guest_commentstrueAllow unauthenticated comments

Environment Variables

VariableMaps To
TALLCMS_COMMENTS_ENABLEDcomments.enabled
TALLCMS_COMMENTS_MODERATIONcomments.moderation

Common Pitfalls

"Comments section doesn't appear on my post"Check three things: the global comments.enabled is true, the Posts block has Show Comments toggled on, and the post status is Published with a published_at date in the past.

"Comment form is visible but nothing happens on submit"Rebuild your theme's frontend assets. The comment form requires the Alpine.js commentForm component, which is bundled in resources/js/tallcms/components/comments.js. Run npm run build in both the root and your theme directory.

"Guest gets 'You must log in' instead of the comment form"Set tallcms.comments.guest_comments to true in your config.

"Comments appear in admin but not on the frontend"Comments must have Approved status to display publicly. Check the comment status in Admin > Comments.


Next Steps

Comments

No comments yet. Be the first to share your thoughts!

Choose Theme