# Comment Deletion

<figure><img src="/files/Io4ZDhzk8Vlidi13If7b" alt=""><figcaption><p>Comment Deletion Options</p></figcaption></figure>

Sometimes comments are left in haste or in the moment, and the user would simply like to remove the comment rather than edit it. Allowing users to delete their comments is a nice way of self-policing their comments.

## Enabling Comment Deletion

<figure><img src="/files/IJFOu6WXWsE1VVEOCQCs" alt=""><figcaption><p>Allow Comment Deletion Option</p></figcaption></figure>

{% hint style="info" %}
Comment deletion is enabled by default
{% endhint %}

When a user edits a comment, they will see a button allowing them to delete their own comment.

<figure><img src="/files/c8c20TvCdL0XPwd4mHDm" alt=""><figcaption><p>Comment with Delete Button</p></figcaption></figure>

When a user chooses to delete their own comment, a confirmation is shown.

<figure><img src="/files/XL5QEJsmJEWHWzxGy9b8" alt=""><figcaption><p>Prompt to Delete a Comment</p></figcaption></figure>

### Delete Only Option

<figure><img src="/files/cDFcvXp7llZddIRjxO14" alt=""><figcaption><p>Allow "Delete Only" Option</p></figcaption></figure>

The "Delete Only" option is designed to only show the Delete option when editing a comment. The Edit button isn't visible, but a Delete option instead.

<figure><img src="/files/MMS2XEkq6aWPJvjQm911" alt=""><figcaption><p>Delete Comment Button on the Frontend</p></figcaption></figure>

## Removing the Confirmation

<figure><img src="/files/qoq0YWg3rWEaaltldFBO" alt=""><figcaption><p>Hide the Delete Button Confirmation Option</p></figcaption></figure>

When editing their comment, the Delete button is shown.

By default, a confirmation is shown to the user to prevent accidental clicks.

<figure><img src="/files/IAKBkrAuc3u0BVNgD91t" alt=""><figcaption><p>Delete This Comment Confirmation</p></figcaption></figure>

You can disable or enable this confirmation by toggling the setting.

## Delete Comments Demo

Here is the behavior of a user deleting a comment.

![Animated GIF of a User Deleting a Comment](/files/UUCu4ba1Z6usyaUxI5Gb)

As you can see, when a user deletes a comment, a status update shows and the comment is removed from view.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dlxplugins.com/comment-edit-pro/features-overview/comment-editing/comment-deletion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
