Tweak the title of WordPress paged posts to avoid duplicates


As you may know Google hates pages with duplicate titles, and WordPress keeps the exact same title on a post even if this post is divided to several pages.

You can use some plugin to tweak the title if a post is paged, but you can also add to the “header” file of your theme this simple code:

<?php if ($paged >= 2 || $page >= 2) echo ' / ' . sprintf( __('Page %s'), max($paged, $page));  ?>

The “echo” places a slash to separate the title from page numbers; you can change this separator at will, placing here a dash or whatever. You can also change the “Page” descriptive with a single P, or even delete it, to let only page numbers show up.