header-logo
Learn how to use Wix to build your site and business.
Design and manage your site using intuitive Wix features.
Manage subscriptions, plans and invoices.
Run your business and connect with members.
Learn to purchase, connect or transfer a domain to your site.
Get tools to grow your business and web presence.
Boost your visibility with SEO and marketing tools.
Get advanced features to help you work more efficiently.
Find solutions, learn about known issues or contact us.
placeholder-preview-image
Improve your skills with our courses and tutorials.
Get tips for web design, marketing and more.
Learn to increase organic site traffic from search engines.
Build a custom site using our full-stack platform.
Get matched with a specialist to help you reach your goals.
placeholder-preview-image

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.
A screenshot showing the functions builder.

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:

  1. Go to Functions in your site's dashboard.
  2. In the Function catalog, click Create Function under Moderate comments.
  3. Click Start from scratch.
  4. Click the Add Step icon  in the function builder. 
  5. Click Condition
  6. Click the Check if field to select a property.
  7. Click Comment content and select 'Plain text comment content'
  8. Click the Select logic drop-down and select contains.
A screenshot showing the condition fields in the panel on the left.
  1. Enter the text you want to flag for rejection.
    Note: If you want to flag multiple words, you need to enter each word separately. 
  2. (Optional) Click Or to add additional flagged words. 
  3. Click Apply at the bottom.
  4. Click the Output Step box in your function builder. 
  5. Click the Moderation status drop-down and select Rejected
  6. Click Apply
  7. Click Activate at the top right. 
A screenshot showing the function builder.

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:

  1. Go to Functions in your site's dashboard.
  2. In the Function catalog, click Create Function under Moderate comments.
  3. Click Start from scratch.
  4. Click the Add Step icon  in the function builder. 
  5. Click Condition
  6. Click the Check if field to select a property.
  7. Click Comment content and select 'Plain text comment content'
  8. Click the Select logic drop-down and select is true.
A screenshot showing the condition fields in the panel on the left.
  1. Click Apply at the bottom.
  2. Click the Output Step box in your function builder.
  3. Click the Moderation status drop-down and select Marked For Moderation.
  4. Click Apply
  5. Click Activate at the top right. 
A screenshot showing the function builder.

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:

  1. Go to Functions in your site's dashboard.
  2. In the Function catalog, click Create Function under Moderate comments.
  3. Click Start from scratch.
  4. Click the Add Step icon  in the function builder. 
  5. Click Condition
  6. Click the Check if field to select a property.
  7. Select Captcha confirmation.
  8. Click the Select logic drop-down and select is true.
A screenshot showing the condition fields in the panel on the left.
  1. Click Apply at the bottom.
  2. Click the Output Step box in your function builder.
  3. Click the Moderation status drop-down and select Captcha Required.
  4. Click Apply
  5. Click Activate at the top right. 
A screenshot showing the function builder.
A screenshot showing the functions builder.
A screenshot showing the condition fields in the panel on the left.
A screenshot showing the function builder.
A screenshot showing the condition fields in the panel on the left.
A screenshot showing the function builder.
A screenshot showing the condition fields in the panel on the left.
A screenshot showing the function builder.