Skip to content

Instantly share code, notes, and snippets.

@woogist
Created June 12, 2015 07:44
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 woogist/20efca4e0ce0af181593 to your computer and use it in GitHub Desktop.
Save woogist/20efca4e0ce0af181593 to your computer and use it in GitHub Desktop.
Change Sensei single course, lesson and quiz titles.
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