How to add dynamic tags to a control in a custom widget. #17051
wordxpression
announced in
Developers Community
Replies: 1 comment
-
After deeper delving in the Elementor Source code I found out it's actually quite simple, it only seems to be completely undocumented in the developers documentation. In the array with settings you have to pass to the add_control method of the Widget_Base, you need to enter one setting called 'dynamic', which points to an array containing 'active' => true So in code something like
It's quite easy, when you know how to do it ;) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I started building my first Elementor widget and it all goes great, thanks to many resources I found on the Internet, but one thing I couldn't find anywhere. How to add dynamic tags to controls in my custom widget.
So let's say I'll have a custom control for entering the title of the widget... and I want to have the possibility to fill this title with a field from the underlying post.
Or I created a clickable control, and I want a pop up activated, a phone number called, or some other action when the control gets clicked... in short, I want this 'pile of pancakes' representing the possibility to link dynamic tags to present itself in my controls.
Could anyone please give me a clue how to get it done. Can't find any helpful resource.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions