Easy way to create Module for Divi Builder. Create wc-custom-divi-module.php file and include its to functions.php file(This file is located in your theme folder). You can use below code to include file wc-custom-divi-module.php.
Module settings are defined in the get_fields() method.
include ‘wc-custom-divi-module.php’;
name = et_builder_i18n( ‘Logo Slider’ );
$this->plural = esc_html__( ‘Logo Slider’, ‘et_builder’ );
$this->slug = ‘et_pb_logo_slider’;
$this->vb_support = ‘on’;
}
public function get_fields() {
return array(
‘src’ => array(
‘label’ => et_builder_i18n( ‘Logo Image’ ),
‘type’ => ‘upload-gallery’,
‘option_category’ => ‘basic_option’,
‘upload_button_text’ => et_builder_i18n( ‘Upload an image’ ),
‘choose_text’ => esc_attr__( ‘Choose an Image’, ‘et_builder’ ),
‘update_text’ => esc_attr__( ‘Set As Image’, ‘et_builder’ ),
‘hide_metadata’ => true,
‘affects’ => array(
‘alt’,
‘title_text’,
),
‘description’ => esc_html__( ‘Upload your desired image, or type in the URL to the image you would like to display.’, ‘et_builder’ ),
‘toggle_slug’ => ‘main_content’,
‘dynamic_content’ => ‘image’,
‘mobile_options’ => true,
‘hover’ => ‘tabs’,
),
Right Now Divi is not providing collapse effect for mobile menu. So when we have many items its hard to manage menu on mobile. It’s a great way to customize the Divi mobile menu using CSS and jQuery. You have to put following code on your css and js files. Put below code on any […]
Leave a Reply