Skip to content

Instantly share code, notes, and snippets.

@ilicfilip
Created July 19, 2017 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ilicfilip/8c4221bbb6eeb7aafe3e14ba95e18f46 to your computer and use it in GitHub Desktop.
Save ilicfilip/8c4221bbb6eeb7aafe3e14ba95e18f46 to your computer and use it in GitHub Desktop.
Child theme
add_filter( 'avada_metabox_tabs', 'avada_child_metabox_tabs', 10, 2 );
function avada_child_metabox_tabs( $tabs, $post_type ){
$screen = get_current_screen();
if( 'avada_portfolio' == $screen->post_type ) {
$tab_key = 'avada_child_portfolio';
$tab_name = esc_html__('Child Portfolio', 'textdomain');
$tabs['requested_tabs'][] = $tab_key;
$tabs['tabs_names'][ $tab_key ] = $tab_name;
$tabs['tabs_path'][ $tab_key ] = get_stylesheet_directory() .'/tabs/tab_'. $tab_key .'.php';
}
return $tabs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment