Skip to content

Instantly share code, notes, and snippets.

@ilicfilip
Created February 24, 2017 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilicfilip/4d0544fe83600296bcf95b4678b90edc to your computer and use it in GitHub Desktop.
Save ilicfilip/4d0544fe83600296bcf95b4678b90edc to your computer and use it in GitHub Desktop.
<?php
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