Add this to your functions.php file in your theme:
// Adds span around the first word of post titles
if ( ! is_admin(false) ) {
add_action('brentini_span_post_title');
function brentini_span_post_title($span_title) {
$span_title = preg_replace('/(^[A-z0-9_]+)\s/i', '<span>$1</span> ', $span_title);
return $span_title;
}
add_filter('the_title', 'brentini_span_post_title');
}
elseif ( ! is_admin(true) ) {
remove_filter('the_title', 'brentini_span_post_title');
}
The output on the frontend for instance, will look like this:
<h2 class="entry-title"><a href="#"><span>Welcome</span> to Wordpress</a></h2>
But it won't be affected on the backend while viewing the posts table.
And then you can style it in your style.css like this for instance:
h2.entry-title span {color:#0531C2}
EDIT: added if else statement to adjust formatting for frontend theme only without adjusting backend theme. Seems to work just fine. If there is a better way, I'd love to hear it, Thanks!