With the filter single_post_title
, you can change the page/post title that is set in the <head><title>Page title</title></head>
.
If you want to change the title that you see in the page header. ( Which i think you want to do).
Use this filter:
add_filter('the_title', 'modify_all_titles', 10, 2);
function modify_all_titles($title, $id) {
return 'SOME TEXT BEFORE TITLE | '.$title;
}
Place this code in the functions.php (use a child theme).
Regards, Bjorn