<p>You can use the <a href="https://verbb.io/craft-plugins/comments/v0/docs/developers/comment-model#methods" rel="nofollow noreferrer"><code>isFlagged()</code> method</a> to only display non-flagged comments:</p>

<pre><code>{% set comments = craft.comments.all({
    limit: 10,
    status: 'approved'
}) %}

{% for comment in comments if comment.isFlagged() == false %}
    {{ comment.comment }}
{% endfor %}
</code></pre>

CC BY-SA 4.0
2019-11-01T14:30:14.427Z
2019-11-01T14:30:14.427Z
Jalen Davenport
<p>Craft CMS V2.<br>
Comment Plugin: <a href="https://verbb.io/craft-plugins/comments" rel="nofollow noreferrer">verbb comment</a></p>

<pre><code>{% set comments = craft.comments.all({
    limit: 10,
    status: 'approved'
}) %}

{% for comment in comments %}
    {{ comment.comment }}
{% endfor %}
</code></pre>

<p>This query fetches all approved comments including flagged (Comment marked as inappropriate) comments because flagged comment status is 'approved'. </p>

<p>But I want to hide flagged comments from approved comments.</p>

<craft2><comments>
Hide flagged (inappropriate) comments from comment list
# Hide flagged (inappropriate) comments from comment list

(Asked by: username_0 on 2019-11-01)

Craft CMS V2.
Comment Plugin: verbb comment
{% set comments = craft.comments.all({
    limit: 10,
    status: 'approved'
}) %}

{% for comment in comments %}
    {{ comment.comment }}
{% endfor %}

This query fetches all approved comments including flagged (Comment marked as inappropriate) comments because flagged comment status is 'approved'. 
But I want to hide flagged comments from approved comments.

**Tags:** craft2, comments

---

## 1 answers

### Answer by username_1 on 2019-11-01. Score: 2 | Accepted answer

You can use the isFlagged() method to only display non-flagged comments:
{% set comments = craft.comments.all({
    limit: 10,
    status: 'approved'
}) %}

{% for comment in comments if comment.isFlagged() == false %}
    {{ comment.comment }}
{% endfor %}


---

