Created
April 29, 2019 12:12
-
-
Save zabidxoothemes/41fb62f3901fedfe7db87fc834e6a812 to your computer and use it in GitHub Desktop.
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
/** | |
* Adding custom tab | |
*/ | |
add_filter( 'learn-press/course-tabs', 'reptro_add_custom_tab' ); | |
function reptro_add_custom_tab( $tabs ){ | |
$tabs['programm_tab'] = array( | |
'title' => __( 'Programma', 'reptro-child-theme' ), | |
'priority' => 5, | |
'callback' => 'reptro_programma_custom_tab_content' | |
); | |
unset($tabs['curriculum']); | |
unset($tabs['instructor']); | |
return $tabs; | |
} | |
if( !function_exists('reptro_programma_custom_tab_content') ){ | |
function reptro_programma_custom_tab_content(){ | |
if( get_the_id() == 4498 ) { | |
echo 'This content will show only in the Programma tab which ID is 4498.'; | |
} | |
if( get_the_id() == 4265 ) { | |
echo 'This content will show only in the Programma tab which ID is 4265.'; | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment