Wix Functions: Moderating Blog Comments
4 min
In this article
- Rejecting comments containing offensive language
- Reviewing comments before they are published on your site
- Screening potential spam comments
Increase your moderation capabilities by adding specific rules and logic to your blog comments. These rules are defined by what you set in your function. For example, you can allow certain people to comment, flag particular comments based on their content, or look for specific words that you deem to be offensive.
Having a more precise comment moderation system in place allows you to keep communities engaged, easily block spam and create a safe place for people to share their thoughts.

Rejecting comments containing offensive language
Automatically reject comments with offensive language by setting up a moderation function. You can set up a function to identify and reject comments with specific words or phrases.
Note:
Currently, functions to help moderate blog comments can only be created from scratch. Templates for specific functions will be added over time.
To reject comments:
- Go to Functions in your site's dashboard.
- In the Function catalog, click Create Function under Moderate comments.
- Click Start from scratch.
- Click the Add Step icon in the function builder.
- Click Condition.
- Click the Check if field to select a property.
- Click Comment content and select 'Plain text comment content'
- Click the Select logic drop-down and select contains.

- Enter the text you want to flag for rejection.
Note: If you want to flag multiple words, you need to enter each word separately. - (Optional) Click Or to add additional flagged words.
- Click Apply at the bottom.
- Click the Output Step box in your function builder.
- Click the Moderation status drop-down and select Rejected.
- Click Apply.
- Click Activate at the top right.

Reviewing comments before they are published on your site
Ensure that only appropriate comments appear on your blog by setting up a function that requires approval before comments are published on your site.
To review all comments:
- Go to Functions in your site's dashboard.
- In the Function catalog, click Create Function under Moderate comments.
- Click Start from scratch.
- Click the Add Step icon in the function builder.
- Click Condition.
- Click the Check if field to select a property.
- Click Comment content and select 'Plain text comment content'
- Click the Select logic drop-down and select is true.

- Click Apply at the bottom.
- Click the Output Step box in your function builder.
- Click the Moderation status drop-down and select Marked For Moderation.
- Click Apply.
- Click Activate at the top right.

Screening potential spam comments
Prevent spam by setting up a moderation function to screen comments before they appear on your blog. By creating a condition that requires CAPTCHA verification, you can reduce the number of spam comments on your blog.
To screen for spam:
- Go to Functions in your site's dashboard.
- In the Function catalog, click Create Function under Moderate comments.
- Click Start from scratch.
- Click the Add Step icon in the function builder.
- Click Condition.
- Click the Check if field to select a property.
- Select Captcha confirmation.
- Click the Select logic drop-down and select is true.

- Click Apply at the bottom.
- Click the Output Step box in your function builder.
- Click the Moderation status drop-down and select Captcha Required.
- Click Apply.
- Click Activate at the top right.
