A small title separator change can make a big impact on your site

Title separator is that one simple character which separates your website title from post and page names. This can be seen on top of your browser tab once you open a website, but more importantly, this separator will be used by Google and other search engines when they display your site in search results.

While there is no proof that different separators can have a different impact on your SEO, you might want to change the standard separator just in order to change the way your WordPress website is being displayed on all the other sites in those search results.

Change title separator:

After WordPress 4.4 came to life, there were new filters introduced, and one of them is directly in charge of title separators. In order to change your title separator, follow these few steps:

  1. Open functions.php file
  2. Copy and paste the following code:
  3. function wploop_change_separator()
    {
    return '|';
    }
    add_filter('document_title_separator', 'wploop_change_separator');
  4. Change the separator in between single quotes on the third line
  5. Save changes

Change title separator for older versions of WordPress:

Before WordPress 4.4 was introduced, title separator could have been easily changed by using the wp_title function. WordPress developers first removed the function from the list of supported ones and it became deprecated. But since a huge number of themes are still using it, developers decided to bring it back.

The following function can still help you change that separator if you’re using older WordPress version, but we advise that you update your WordPress as soon as possible (for many different reasons) and go with new method shown above; sooner or later, wp_title function will become deprecated once and for all and you will have to modify functions.php once again.

function change_wp_title_separator( $title, $sep ) {
$sep = '-';
$title = str_replace( '|', $sep, $title );
return $title;
}
add_filter( 'wp_title', 'change_wp_title_separator', 10, 2 );

While you can change the separator to any character you want, we advise not to do so. For example, there are some special characters which Google simply won’t show and you don’t want your site title to look unprofessional. Some of the most common separators are “|”, “-“ and “>” so don’t exaggerate and choose the one you like the best.

In one of our next articles, we’re about to show you how to change WP title by using a newly introduced filter.

START YOUR OWN BLOG

This guide is an introduction to mastering the art of blogging. It provides easy to follow steps to start, maintain, and grow your blog.

Read the guide

2 thoughts on “A small title separator change can make a big impact on your site

  1. My title at the moment is “Homes for Sale in McDonough GA | McDonough GA Homes for Sale” Does google more weight on the title on the left side? According to jaaxy.com “Homes for Sale in McDonough GA” is a more highly searched term than McDonough GA Homes for Sale.

Leave a Reply

Your email address will not be published. Required fields are marked *