ControlledChaos
1/8/2016 - 12:18 AM

Filter to change the WordPress title tag separator when using add_theme_support( 'title-tag' );

Filter to change the WordPress title tag separator when using add_theme_support( 'title-tag' );

<?php
// Default separator is a hyphen. Here we change it to a vertical bar.
function ccd_document_title_separator( $sep ) {
  $sep = "|";
  return $sep;
}
add_filter( 'document_title_separator', 'ccd_document_title_separator' );
?>

Filter Title Tag Separator

WordPress Snippet