Home
/
Drupal Tutorials
/
Add and Manage a Blog in Drupal

Add and Manage a Blog in Drupal

Blogs are an essential part of every website nowadays and a great way to share the news with your audience. In this tutorial, you will learn how to add a Blog section to your Drupal website.

There was a blog module included in the core for Drupal 7 and earlier versions. For the Drupal 8 core, however, it was removed and it is now a contributed module.

Add content type

To create a blog in Drupal 8, go to Structure and click on the Content types menu.

After that, you should press Add content type which would lead you to the content type creation page. After you choose a name for your content type, just click Save and manage fields.

Add comment field

When your new content type is ready, you should go to Structure > Content types again. Now you should see the newly created content type in the list.

Click on Manage fields for the Blog content type, and then on Add field. From the drop-down, choose Comments: comment. Edit the Label if necessary and press Save and continue when you are ready.

From the field edit page, you can configure the default value; if the comments should be open, closed or hidden and display settings. The same settings are used in Drupal 7 so they might look familiar if you had a blog on Drupal 7. Once you have adjusted the necessary options, press Save settings.

Adjust comment permissions

By default, Drupal 8 does not allow non-registered users to post comments. In case you want to allow users to add comments without registering or logging in, make sure to configure your blog accordingly.

Click on the People tab and choose the Permissions section to review the available options.

If you want to allow anonymous users to post comments, make sure to place a tick on the Post comments field under Anonymous user. Leave the Skip comment approval option unticked if you want to approve anonymous comments before posting them.

When you adjust the settings as desired, press Save permissions.

Create the blog page

Now you should go ahead and create a new Blog page via Content > Add content. Make sure to choose the Blog content type.

After you adjust the Title, URL alias and other settings accordingly, click on Save.

Now your new awesome blog page is ready!

Approve comments

Once an anonymous user adds a comment, they would receive a notification that the comment should be approved first.

You may approve these comments via Content > Comments > Unapproved comments. From the Action drop-down menu choose whether you want to publish or delete the selected comments. After that press the Apply to selected items button.

That’s it! Now you have an awesome blog in your Drupal 8 website.

Share This Article