# Change the Title Separator

> Changes the character between the page name and the site name in browser tabs and search results, for example from a dash to a vertical bar.

- Type: PHP
- Runs: Run everywhere
- Category: [SEO](https://wpide.com/library/category/seo/)
- Tags: title, separator, branding
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/change-title-separator/

## Code

```php
// Character placed between the page title and the site name.
$wpide_title_separator = '|';

add_filter( 'document_title_separator', function () use ( $wpide_title_separator ) {
    return $wpide_title_separator;
} );
```

## Notes

Some SEO plugins set their own separator and ignore this one.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Change the Title Separator" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
