This module allows you to pin a specific top-level comment, along with its replies, to the very top of a node's comment section. An optional submodule can automatically pin the most-liked comment.
The Comment on top module pins one top-level comment, together with its replies, to the top of a node's comment list.
3.x uses Drupal's default comment list. You do not need a Views block, and you should not hide the Comments field. The current stable release is still 2.0.3, which uses the older Views setup below.
Features
Drupal's default comment order is by date. This module lets you pin one favorite top-level comment above the others. Replies stay with their parent; they cannot be pinned on their own.
On a node with comments, roles with permission see "Stick on top" under each top-level comment, and "Remove from top" on the pinned one.
The submodule Comment on top by likes can pin the most liked top-level comment automatically (likes minus dislikes), using the Like/Dislike module.
Post-installation (3.x)
See the README: 3.0.x README.
- Requires the core Comment module and a Comments field left enabled in Manage display.
- On Drupal 11.4 Standard, create a content type, a comment type, and a Comments field first.
- Grant "Administer Comment on top" at
/admin/people/permissions/module/comment_on_top. - Optionally disable the feature for some comment types at
/admin/config/content/comment-on-top. - Use "Stick on top" / "Remove from top" on a node with comments.
For likes pinning, enable the submodule, add a Like/Dislike field to the comment type, then enable comment types at /admin/config/content/comment-on-top/by-likes (or per node under Comment settings).
A theme may override the pinned comment with comment--pinned-on-top.html.twig.
Uninstallation (3.x)
Uninstall Comment on top by likes first if it is enabled, then Comment on top, at /admin/modules/uninstall. You do not need to remove a Views block or restore the Comments field.
Ask your assistant about Comment on top
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- comment Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 3.0.0 | Stable | 10–11 | Sep 28, 2026 | ||
| 3.0.0-beta1 | Pre-release | 10–11 | Sep 10, 2026 | ||
| 3.0.0-alpha1 | Pre-release | 10–11 | Sep 9, 2026 | ||
| 3.0.x-dev | Dev | 10–11 | Sep 9, 2026 | ||
| 3.x-dev | Dev | 10–11 | Sep 9, 2026 | ||
| 2.0.3 | Stable | 8–10 | Apr 8, 2024 | ||
| 2.0.1 | Stable | 8–10 | Mar 29, 2024 | ||
| 2.0.0 | Stable | 8–10 | Mar 4, 2024 | ||
| 1.1.8 | Stable | 8–10 | Jan 4, 2024 | ||
| 1.1.7 | Stable | 8–10 | Dec 28, 2023 |