Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Commerce Authorize.Net 2.0.0 Major update available for module commerce_authnet (2.0.0). Usage Milestone: Easy Breadcrumb Module easy_breadcrumb crossed 100,000 active installs. Release: Open Intranet 1.10.0 Minor update available for distribution openintranet (1.10.0). Release: Pagedesigner 4.2.10 Minor update available for module pagedesigner (4.2.10). Release: Media Scroller 1.0.7 Minor update available for module media_scroller (1.0.7). Release: Content Insights Report 1.0.12 Minor update available for module content_insights_report (1.0.12). Release: SDC Components 2.0.3 Minor update available for module sdc_components (2.0.3). Release: Commerce ML Starter 8.x-1.94 Minor update available for module cmlstarter (8.x-1.94). Release: Field Label Visibility (an intuitive approach to editing node forms) 1.0.3 Minor update available for module field_label_visibility (1.0.3). Module Revived: URL Entity 1.1.0 Module url_entity updated after 9 months of inactivity (1.1.0).

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 (alpha) 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.

Version 2.x (current stable)

2.x uses a Views block and requires hiding the Comments field. Full steps: 2.0.x README and this video.


Show version 2.x installation and uninstallation (Views block)

Post-installation version 2

The module is based on the Views block, which means that the default query display comments must be disabled.
So you need to follow the steps below. Or take a look at this video https://www.youtube.com/watch?v=_ffaI9N5B8U

After module installation, you'll get a new View block called "Comments with one sticked on top".
So you need to put it in the right place:
- Go to /admin/structure/block and in region "Content" click on the "Place block" button.
- Select block "Comments with one sticked on top", uncheck "Display title" and save it.
- If block is not placed under "Main page content", use drag'n'drop to move it under.

The next step is to disable the default query comment display, otherwise, you'll have doubled comments:
- Go to EVERY Content type where you have the Comment type field here /admin/structure/types/. In most cases, it will be an Article content type.
- Click on Article "Manage fields" and go to the tab "Manage display".
- Use drag'n'drop to move the "Comments" field under where the "Disabled" fields are, and save it.
- Repeat the last three steps for EVERY content type where you have Comments.

Setting permissions and using module:
- Set permissions for roles that have access to Stick comments on top, by checking it here admin/people/permissions/module/comment_on_top.
- Finally, go to the node where you have comments, for example /node/1.
If you are logged in as a user who has the role to Stick comment on top, you will now get the "Stick on top" button under every comment that is not a reply.
- When you click on "Stick on top" on a favorite comment, page will refresh, and that comment with its replies will be on top.
- If you want to change your favorite comment for that node, what will be on top, just click the below comment "Stick on top", and it will replace the current Comment on top.
- If you want default sorting, just click on the top comment "Remove from top".

If you want the most liked comment to be sticked to the top, there is a submodule called 'Comment on Top by Likes', which also needs to be enabled.

Also you need to follow all above from Post-Installation version 1 because version 2 require all configuration from first version.

This module doesn't have special configuration.

Firstly, you need to install and configure Like/Dislike module.
That means adding field_like_dislike in Comment fields.
That gives Like and Dislike buttons on every comment.

The submodule Comment on top by likes calculates the most liked comment by subtracting dislikes from likes and sticks it to top.

There are two ways to select nodes where most liked comment will be sticked on top:
- Checkbox "Stick on top by likes" in node create/edit form under Comment settings;
- In /admin/config/system/content-type-comment-on-top-by-likes-settings you can choose content types where all nodes will have comments sticked on top by likes;

If you use submodule Comment on top by likes, you need contribute module Like/Dislike

Uninstallation version 2

To uninstall Comment on top module and return all to default, please follow the below steps.
Or take a look at the video from this time https://youtu.be/_ffaI9N5B8U?t=293

Remove block "Comments with one sticked on top"

- Go to /admin/structure/block/ and under the "Content" region, there is a "Comments with one sticked on top" block.
- Click on the down arrow near Configure on that block and click "Remove". Confirm the removal in the pop-up window.

Remove the Stick on top field from Comment type:

- Go to /admin/structure/comment/ and click on "Manage fields".
- On "Stick on top" field, click on the down arrow near Edit and click on Delete.
- Confirm deletion in the pop-up window.

Uninstall Comment on top module:

- Go to /admin/modules/uninstall to uninstall the module.
- From all modules, check "Comment on top" and click the Uninstall button. Confirm it on the next screen.

Returning the default query, displaying comments:

- Go to EVERY Content type where you disabled the Comment type field here /admin/structure/types/.
- For example, click on Article "Manage fields" and go to the tab "Manage display".
- Use drag'n'drop to move the "Comments" field above the "Disabled" fields to enable it and save it.
- Repeat last three steps for EVERY content type where you have Comments.

Comment on top by likes uninstall as every other module. Go to /admin/modules/uninstall to uninstall the module.

Then you need to proceed with all steps above from Uninstallation version 1.

Similar projects

Best reply and Comments order are similar but they can't stick a comment to the top.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Sep 2026
Latest release
1 hour ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
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