AgeOnce Docs
WordPress

Content Restriction

Protect pages, posts, and products with age verification

Content Restriction

The AgeOnce plugin protects content based on Content Rules configured in AgeOnce settings.

Restriction Methods

1. By category or taxonomy

Configure in AgeOnce → Content Rules:

  1. Enable the post type (e.g. Posts, Products)
  2. Select Active Age Groups (16+, 18+, 21+)
  3. For each age group (e.g. 18+ Rules), choose taxonomy terms (Categories, Product Categories, etc.)
  4. All content in those terms will require verification for that age

2. Manual per-post lock

When Allow Manual Locking via Metabox is enabled for a post type in AgeOnce → Content Rules:

  • You can protect individual pages, posts, or products that don't belong to any restricted category
  • An AgeOnce Protection metabox appears in the sidebar on the post/page/product edit screen
  • In that metabox, check Require Age Verification to protect that specific item
  • Save the post — only that item will require 18+ verification, regardless of its category

Use this when you need to lock a single page or product without creating a category for it.

3. Per-product (WooCommerce)

For individual products:

  1. Edit the product in WooCommerce
  2. In Product Data → General, find Age Verification Required
  3. Check the box
  4. Save

The product will require verification at checkout and when viewed (if Products are enabled in Content Rules).

Restriction Behavior

For unverified users

When an unverified user opens protected content:

  • A gate message is shown instead of the content
  • "Verify Age" button redirects to AgeOnce
  • After verification, user returns to the same page and sees the content

Verification storage

The verification result is stored in the session (WooCommerce session for logged-out users). It persists until the session ends (e.g. browser closed).

WooCommerce checkout

Products that require age verification will show the verification gate at checkout. The user must complete verification before placing the order.

Combine Content Rules (categories) with manual locks and per-product settings for flexible control.

On this page