You need to use the_title
filter, not the_content
.
Also make sure you have the_title()
function somewhere in your single post page.
Here is the code:
function theme_slug_filter_the_content( $title ) {
$custom_title="MY CODES";
$custom_title .= $title ;
return $custom_title ;
}
add_filter( 'the_title', 'theme_slug_filter_the_content' );