- This topic has 2 replies, 2 voices, and was last updated 9 months, 1 week ago by .
-
Topic
-
Hi, I hope you’re well.
I’m trying to figure out how to have multiple relations when setting up the visibility for a field/meta box. The idea being it should be visible if any of a number of conditions are met AND some other condition is met.
Something like this:
'visible' => [ [ 'when' => [ ['page_template', 'in', ['default','page_templates/template-homepage.php']], ['post_type', 'in', ['capability','sector']], ], 'relation' => 'or' ], [ 'when' => [ ['capability_layout', '!=', 'alt'], ], 'relation' => 'and' ], ],
How can I acheive this?
Cheers,
Will
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.