Skip to content

Instantly share code, notes, and snippets.

@FinalDestiny
Created February 28, 2019 11:25
Show Gist options
  • Save FinalDestiny/6fc4788f87614f492098fe074e5aee5c to your computer and use it in GitHub Desktop.
Save FinalDestiny/6fc4788f87614f492098fe074e5aee5c to your computer and use it in GitHub Desktop.
1 - Create a folder called module in the child theme folder.
2 - Duplicate the includes/builder/module/FilterablePortfolio.php file of the parent theme into this new created folder of the child theme.
3 - Open the FilterablePortfolio.php file in child theme and change the name of the class ET_Builder_Module_Filterable_Portfolio (line 3) to something else (ex: Cu_ET_Builder_Module_Filterable_Portfolio).
4 - Do the same with the last line: new Cu_ET_Builder_Module_Filterable_Portfolio;
5 - Add this code in the functions.php file of the child theme:
function filterable_module_setup() {
get_template_part( 'module/FilterablePortfolio' ); remove_shortcode( 'et_pb_filterable_portfolio' );
add_shortcode( 'et_pb_filterable_portfolio', array( new Cu_ET_Builder_Module_Filterable_Portfolio(), '_shortcode_callback' ) );
}
add_action( 'et_builder_ready', 'filterable_module_setup' );
6 - Now you can modify the video module from child theme as needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment