Hang Tight...

Boolean Operators

Understanding Boolean Operators in LoopPress

Hello artists! If you’re using LoopPress for token gating on your site, it’s essential to understand how Boolean operators work. These operators help you set specific conditions for your content access. Let’s break them down in a simple and easy-to-understand manner.

1. + (AND)

When you use the + operator, it means both conditions must be met.

  • Example: If you have two tokens, songA and songB, and you want both to be required for access, you’d use: [looppress token="songA+songB"]. This means a user must have both songA AND songB tokens to access the content.

2. , (OR)

The , operator means either of the conditions can be met for access.

  • Example: For tokens songA and songB, if you want a user to have access with either one, you’d use:
    [looppress contract="songA,songB"]
    This means having songA OR songB will grant access.

3. ! (NOT)

The ! operator excludes users with a specific token.

  • Example: If you want to grant access to everyone except those with the songB token, you’d use:
    [looppress contract="!songB"]


The * operator indicates multiple instances of a token.

  • Example: If you want a user to have access only if they have three instances of the songA token, you’d use:
    [looppress contract="songA*3"]

5. () (Parentheses)

Just like in math, parentheses () determine the order of operations. Conditions inside the parentheses are processed first.

  • Example: If you want users to have access if they have both songA AND songB, OR if they don’t have songC, you’d use:
    [looppress contract="(songA+songB),!songC"]

How to Implement on Your Site:

  1. Determine the conditions you want for access to your content.
  2. Use the appropriate Boolean operators as explained above.
  3. Insert the [looppress contract="..."] shortcode into your post or page where you want the gated content.

Remember, these operators help you create flexible and specific conditions for your content. Tailor them to your needs and ensure your fans have the right access!