Last active
April 29, 2019 10:00
-
-
Save zabidxoothemes/cfe43141dc746c40c111339ad2739249 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' => 65, | |
'callback' => 'reptro_programma_custom_tab_content' | |
); | |
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