Home › Forums › Support › Title tag separator This topic has 3 replies, 2 voices, and was last updated 8 years, 7 months ago by bdbrown. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts September 6, 2015 at 6:41 am #134754 Tara Hi Tom What’s the best way to change the separator in the <title> tag? I’ve found https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_title but it’s still not clear where to customise the separator, or how this function differs from the default titles. All I really need is to change a single character from ‘|’ to ‘-‘. Thanks Tara September 6, 2015 at 9:06 am #134774 bdbrown Hi Tara. Try adding this to a child theme functions.php file: add_filter( 'wp_title', 'my_wp_title' ); function my_wp_title($title) { $title = str_replace( "|","-",$title ); return $title; } Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/ September 6, 2015 at 11:34 am #134815 Tara That’s perfect, thank you! September 6, 2015 at 1:49 pm #134834 bdbrown You’re welcome; glad to help. Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In