- This topic has 2 replies, 2 voices, and was last updated 12 months ago by .
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?
- You must be logged in to reply to this topic.