Skip to content

Instantly share code, notes, and snippets.

View coeneivan's full-sized avatar
🧉

Ivan Coene coeneivan

🧉
View GitHub Profile
@iqbalrony
iqbalrony / Extend-exiting-Elementor-widget.php
Last active September 28, 2023 13:47
Add a custom control and render attribute to an existing Elementor widget
<?php
// This example will add a custom "select" drop down & "switcher" to the "testimonial" section
// and add custom "color" to the "testimonial style" section
add_action('elementor/element/before_section_end', 'add_control_in_existing_widget', 10, 3 );
function add_control_in_existing_widget( $section, $section_id, $args ) {
if( $section->get_name() == 'testimonial' && $section_id == 'section_testimonial' ){
// we are at the end of the "section_testimonial" area of the "testimonial"
$section->add_control(
'testimonial_name_title_pos' ,
[