Title separator (wordpress)

Change the separator for the document title.

<?php
/**
 * Change the separator for the document title.
 */
add_filter('document_title_separator', function($sep) {
    $sep = '|';
    return $sep;
});
?>

functions.php

< toolbox