I want to replace first word in title to have <span></span>
inside.
Example for Wordpress title
<h2 class="entry-title"><a href="#">Welcome to Wordpress</a></h2>
I want to be like this
<h2 class="entry-title"><a href="#"><span>Welcome</span> to Wordpress</a></h2>
the function
function span_on_title($span) {
return preg_replace('', '', $span, 1);
}
add_filter('the_title','span_on_title');
May i know what to put on the preg_replace