Created
July 19, 2017 13:44
-
-
Save ilicfilip/8c4221bbb6eeb7aafe3e14ba95e18f46 to your computer and use it in GitHub Desktop.
Child theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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