The User Meta condition allows you to control the visibility of WordPress blocks based on meta data of the current user.
This is a developer level condition.
All user meta will be available including custom meta data from other plugins such as Advanced Custom Fields.
You can check if the current user by their name by using the meta key
The setup is very similar to our Post meta (custom fields) condition.
Post Meta Key
Set the Post Meta Key (name) of the meta field you’d like to check. Each piece of metadata will have a key and a value.
Set your requirements for making the selected WordPress block visible. Conditional Blocks will only make the block visible if the post meta value meets your expectations.
- If Truthy
- If Falsy
- If Empty
- If Not Empty
- If Equals
- If Doesn’t Equal
- If Contains
- If Doesn’t Contain
Post Meta Value (if needed)
What’s the expected value of the Post meta? You can specify a word to check if the post meta value contains the word.
Example: The users first name contains the text “Morgan”.