Adding a comment field to a basic page in Drupal 8

While comments are connected to the article content type by default in Drupal 8, there are others that do not. In these cases, such as the page content type, it will need to be added to the default structure. Follow along below as we guide you on how to add the comment field to a basic page in Drupal 8.

How to enable comments for a basic page

  1. Log into your Drupal 8 admin interface.
  2. Using the top menu bar, select the Menu option. From there, another menu will appear below. Choose the Structure option from the second menu.

  3. This will bring up a screen of all the structure types. Click on the Content types to continue.

  4. This will list all of the current content types available. The procedure for adding a comment field is the same regardless of content type. Select the content type you want to work with. We will work with the Basic page content type. Click on the Manage fields option from the dropdown to the right side of the Basic page row.

  5. This leads you to the Basic page settings page. You will see the basic fields for the basic page, which is the body field. Under this field is an empty field labeled Add new field> Give the comment field a name here, most likely something line ‘comment‘.

  6. Next, move to the dropdown to the right and select the field type Comments from the list.
  7. Once you have completed that, click on the Save button at the bottom of the page. This will activate your new comment field for the basic page (or whichever content type you worked with).
    DefaultComent field added

2 thoughts on “Adding a comment field to a basic page in Drupal 8

  1. I am essentially satisfied with your great work. The attached patch refactors the module to allow it to take into account the id attribute of the wrapper element for a given comment field.

Was this article helpful? Join the conversation!

Server Madness Sale
Score Big with Savings up to 99% Off

X