Skip to content

Instantly share code, notes, and snippets.

View iqbalrony's full-sized avatar
🏠
Working from home

Iqbal Hossain Rony iqbalrony

🏠
Working from home
View GitHub Profile
@iqbalrony
iqbalrony / Extend-exiting-Elementor-widget.php
Last active June 12, 2024 19:13
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' ,
[
@iqbalrony
iqbalrony / custom-function-for-wp.php
Last active July 19, 2023 10:27
Necessary function, which can be used in making of theme for client or ThemeForest or helper plugin for page builder. (custom function for wp)
<?php
/**
* Necessary function, which can be used in making of theme
* for client or ThemeForest or helper plugin for page builder.
*/
/**
* Those two functions are for set and get attribute for html tag.
* Example:- for set attribute