12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on May 2, 2023

Meta Box Checkbox List Condition in Oxygen

Sridhar Katakam

This premium tutorial provides the steps to set up a custom condition in Oxygen for outputting elements only if the current user has the selected option ticked via a Checkbox List type of Meta Box field.

Field group for Users:

Field being populated on a user profile page:

Applying the condition in Oxygen builder:

With the above applied to say, a Section, the Section will be output only if the current user has "Download rights" ticked in his/her user profile.

Step 1

Install and activate Meta Box and Meta Box AIO plugins.

Create a field group having a "Checkbox List" type of field. The ID of the field used in this example is user_options.

In the Settings tab select "User" for Location.

Edit the users (as an admin) or have the users edit their profile and select the options that apply.

Step 2

Create a new code snippet using a plugin like WPCodeBox.

Title: [Condition] User Options

Hook: plugins_loaded

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right