Hi guys,

I have a strange problem - when Google indexes my blog posts it picks up a "|" after the title.

For example; BLOG POST TILE |

In WordPress it looks fine, but Google keeps adding this pesty | symbol.

Anyone know how to fix this ?

Dani AI

Generated

A trailing pipe in Google results usually means the HTML title Google indexed contains that separator (or Google reconstructed a title using parts that include one). Start by confirming where the pipe is coming from and then fix the generator.

View the raw page source (Ctrl+U) and look for the <title> tag. If the pipe is present there, the theme or a plugin is producing it. Search your theme and plugins for wp_title, document_title_parts, or any hard-coded <title> and for literal "|". If you don’t see the pipe in source, Google may be choosing a different title from the page; use Search Console URL Inspection to see what Google sees.

Common fixes:

  • Make the theme/plugin not output an empty site/tagline part so the separator isn’t appended.
  • For modern themes, filter document_title_parts to remove empty parts before WordPress joins them:
add_filter( 'document_title_parts', function( $parts ) {
    foreach ( $parts as $k => $v ) {
        if ( trim( $v ) === '' ) {
            unset( $parts[ $k ] );
        }
    }
    return $parts;
} );
  • For older themes using wp_title(), a short trim filter will remove trailing separators:
add_filter( 'wp_title', function( $title ) {
    return rtrim( $title, " |" );
} );

Checklist:

  • Check Settings → General for stray spaces in Site Title/Tagline.
  • Inspect SEO plugin title templates and any global “separator” setting.
  • Search all active plugins for title filters (some plugins hook into title output).
  • Use a child theme and backup before editing theme files.
  • After fixing, request reindexing in Google Search Console and re-submit your sitemap.

Background reading: WordPress title handling and hooks are documented in the Theme Handbook and reference pages, and Google’s guidance explains how it chooses page titles:

Ties to this thread: was correct to suspect a plugin; and were right that a separator is being appended; ’s note about Google sometimes choosing its own title is relevant when the pipe does not appear in the page source.

Recommended Answers

All 4 Replies

Are you using the all-in-one seo plugin, I know it can change the title of the post page.

It will be visible on only blog posts not on the blog home page. If your blog post title are appending with the help of a | (pipe line) separator, google will also show it while displaying your title in SERP. Since | are used to Append the title of the blog posts so if you do not want to see it in search result just log into your wp admin area and change it with whatsoever you want instead of |.

regards
zabalex

i think u have use some plugin..u can take a look

Use most popular SEO plugin for your wordpress blog.

AllinOneSEOPack

It would helps you a lot to manage your on-page optimization tags. I am using this plugin for all my blogs. I strongly recommend this.

And nowadays google displaying there own titles.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.