str_replace the_title(); blues May 29, 2022 by Tarik Billa That’s because the_title() echoes the title. Use this instead: echo str_replace( 'Tutorial: ', '', get_the_title() );