Change Sensei single course, lesson and quiz titles.
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('sensei_single_title', 'custom_single_title_prepend'); | |
/** | |
* Filter the sensei single titles ( singular course, lesson and quiz ) | |
* | |
* @param $title | |
* @return string | |
*/ | |
function custom_single_title_prepend( $title ){ | |
if( is_singular( 'course' ) ){ | |
return 'Course: '. $title; | |
}elseif( is_singular( 'lesson' ) ){ | |
return 'Lesson: '. $title; | |
}elseif( is_singular( 'quiz' ) ){ | |
return 'Quiz: '. $title; | |
}else{ | |
return $title; | |
} | |
} // end custom_single_title_prepend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment