screenshot

Divi modules normally come up with three modules tabs

download

What if we want to add new tabs for our custom modules?  Divi theme provides awesome filter to add tabs on your module. You can see on

Divi/Includes/Builder/class-et-builder-element.php

return apply_filters( ‘et_builder_main_tabs’, $tabs );   

Now we are using new tabs on existing modules tabs.

add_filter( ‘et_builder_main_tabs’, ‘custom_module_add_module_tabs’  );

function custom_module_add_module_tabs( $tabs ) {
$tabs[ ‘custom_modules_tab_slug’ ] = esc_html__( ‘Custom Modules Tabs’, ‘et_builder’ );
return $tabs;
}

This will produce modules tabs as follows:

custom-modules

Note: If you find nothing changes after doing following this all steps properly, then you have to clear local storage of browser . You can do this by running this javascript command on console window.

window.localStorage.clear()

Also to appear on module tab you need to add setting  on that section[ tab ]

Let me know if you have any question or queries regarding to divi theme or its module.

Thanks

Advertisements