Snippets

The komments plugin provides Snippets for integrating comments into your pages. You can simply use those Snippets, customize them or build your own.

List of all Snippets

snippet description filename
komments/form Shows the comment form form.php
komments/response/base Basis for each response type customizable by slots response-base.php
komments/response/comment Shows a single comment response-comment.php
komments/response/like Shows a single like response-like.php
komments/response/mention Shows a single mention response-mention.php
komments/response/reply Shows a single reply response-reply.php
komments/response/repost Shows a single repost response-repost.php
komments/list/comments Lists all published comments list-comments.php
komments/list/likes Lists all published likes list-likes.php
komments/list/mentions Lists all published mentions list-mentions.php
komments/list/replies Lists all published replies list-replies.php
komments/list/reposts Lists all published reposts list-reposts.php

Customizing Snippets

You can customize each Snippet to your needs by overwriting it:

  1. Create a new snippet under site/snippets/list/TYPE.php or site/snippets/response/TYPE.php
  2. Copy the code from the existing Snippet to the new one
  3. Add changes to your liking

The response base Snippet

Every response type Snippet uses the response base Snippet as its foundation. The base Snippet uses slots, so you can easily use it for your customizations.

The following Slots are available:

  • header
  • body
  • footer
  • replies