Comments (9)
@KingYes I hope you don't mind me commenting on this, but it would be helpful to get this added to the newly created developer portal - https://developers.elementor.com/creating-a-new-widget/
I've used
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Class_Name_Widget() );
in case any stumbles across this.
from elementor.
@jonathanbossenger Hello,when I created customize new widget,There are some Widget Controls not working, E.g: SLIDER/COLOR/SWITCHER,
Have you encountered this problem?
from elementor.
Hi,
We still don't have official API, but you can write a regular WordPress widget and he will be available in builder widgets.
from elementor.
@nicolas92 Fast example:
add_action( 'elementor/widgets/widgets_registered', function() {
\Elementor\Plugin::instance()->widgets_manager->register_widget( 'WIDGET_CLASS' );
} );
Change the WIDGET_CLASS
to your own class of the widget.
BTW, as @yehudah say, it's not official API to register widgets, so maybe it's can to change in later versions of the Elementor. But for now it's need to be work for you.
from elementor.
Ah thin, I thought it was possible, prévoyer you do it in long time?
I think your plugin will cartoning, so many dévelloppeur will want to integrate their own widgets like visual composer.
from elementor.
Thank you very much @KingYes, but it is not urgent, I'll wait for the official API, thank you :)
from elementor.
No problem :)
Thanks for your review and 5-stars 👍
from elementor.
You deserved, amazing plugin :)
from elementor.
I used the following code inside my functions.php to add an elementor-widget.
add_action( 'elementor/widgets/widgets_registered', function($elementorWidgetManager) {
include_once __DIR__.'/path-to-my-widget-file.php';
$elementorWidgetManager->register_widget_type( new MyCustomElementorWidget() );
});
By making the include of the code inside the action-hook, i can make sure elementor is installed, active and already loaded.
I support the request of @jonathanbossenger, it belongs something in the documentation how a new elementor widget can be registered correctly.
from elementor.
Related Issues (20)
- Uncaught TypeError: e.O is not a function HOT 6
- Display Conditions settings reset to "All" for location after saving
- ❌ Invalid Issue
- ✅ 🔗 🐞 Copy & pasting with keyboard shortcuts breaks accordion widget (Duplicate of #25861) - [ED-14553] HOT 6
- Repeatative Issue
- Elementor - Section - Column image Dissapears and goes black with new update
- Call to action Element CSS Issue
- 🔣 🔃 📚 Translations loaded too early (PR #27200) HOT 2
- Error when you pick an image in media controller (custom widget) HOT 1
- Double Menu Problem after Updates
- elementorFrontend.init() create duplicates of .sub-arrow (Wordpress Menu widget)
- Fullscreen Search Widget: Zooming Loading Effect and Oversized Icon HOT 1
- Elementor Pro - Fatal Uncaught TypeError caused by empty settings in Loop Grid widget
- ❌ Invalid issue
- Cross site copy paste functionality keeps loading forever after pasting HOT 2
- Image Carousel Lazy Load: images looks broken before loading
- Elementor AI welcome PopUP height is bigger than screen size HOT 1
- ❌ Invalid Issue
- Loop widget on a single post template modifies data of following widgets which rely on the current post
- Search form in fullscreen doesn't show true overlay cover when mouse is placed on the site
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elementor.