Elementor: Condition for a specific control

Created on 24 Jun 2018  路  3Comments  路  Source: elementor/elementor

Hello Elementor's Team :)

I'm working now on developing a new custom widget for Elementor, and I need to put some conditions for specific controls, I found that 'condition' parameter in "add_control" function is actually an array, but I need to make the control to appear if one of the conditions is true not both of them, I'm not sure how this can be done in the code, so may I ask you to help me with that ?

Have a great day!!

Thanks,
Abanob

typdeveloper-api

Most helpful comment

There are two parameters you can use:

  • condition which is a flat array of key-value with an AND between each of the conditions.
  • conditions ( mind the "s" ) which is used for more complex conditions where you can define relations and nested conditions.

See this issue for reference: https://github.com/pojome/elementor/issues/4237

All 3 comments

There are two parameters you can use:

  • condition which is a flat array of key-value with an AND between each of the conditions.
  • conditions ( mind the "s" ) which is used for more complex conditions where you can define relations and nested conditions.

See this issue for reference: https://github.com/pojome/elementor/issues/4237

It worked !!

Really thanks bainternet :)

I wrote extensively about control conditions, hopefully someone can learn from it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rahulv3a picture rahulv3a  路  3Comments

pingram3541 picture pingram3541  路  3Comments

Bobbutterfly picture Bobbutterfly  路  3Comments

pnpetroff picture pnpetroff  路  3Comments

joelbqz picture joelbqz  路  3Comments