As it’s known there is a tag <!--nextpage--> in Wirdpress, which allows to break long article into two or more parts.
It’s also known that Google doesn’t like when artcles’ titles are duplicated completele (it will be markes at webmaster bar).
While deviding the page woth tag <!--nextpage--> the totles are duplicated to equal.
Today I’ve spent much time to decide how to solve it. Searching through official documents and WordPress forum brought nothing, even like applying different SEO- plugins. At last, to my pleasure, such a decision was found in the article of one indonesian web-designer «Avoiding Duplicate Title Tag on WordPress Post».
Here is the point.
You should find the line in the file header.php, which contains
Before </title> add
2 |
if ( get_query_var('page') ) { |
3 |
print ' – Part ' . get_query_var('page'); |
Then open single.php, and change
to
3 |
if ( get_query_var('page') ) { |
4 |
print ' - Part ' . get_query_var('page'); |
It will allow to make nice title for the secondpage, not only meta-tag title.
If there is no definite task for searching optimization, I use SEO- plugins seldom last time, Google officially doesn’t count meta-tag keyword anв the title can be made nice in WordPress template.
Here is the example of the code (together with page numbers for the articles devided by tag <!--nextpage-->)
02 |
<?php if ( is_home() ) { ?><?php bloginfo('description'); ?> - <?php bloginfo('name'); ?><?php } ?> |
03 |
<?php if ( is_search() ) { ?><?php echo $s; ?> - <?php bloginfo('name'); ?><?php } ?> |
04 |
<?php if ( is_single() ) { ?><?php wp_title(''); ?> - <?php bloginfo('name'); ?><?php } ?> |
05 |
<?php if ( is_page() ) { ?><?php wp_title(''); ?> - <?php bloginfo('name'); ?><?php } ?> |
06 |
<?php if ( is_category() ) { ?>Category: <?php single_cat_title(); ?>. <?php bloginfo('name'); ?><?php } ?> |
07 |
<?php if ( is_month() ) { ?>Archives <?php the_time('F Y'); ?>. <?php bloginfo('name'); ?><?php } ?> |
08 |
<?php if ( is_tag() ) { ?> <?php bloginfo('name'); ?>: <?php single_tag_title();?><?php } ?> |
09 |
<?php if ( is_404() ) { ?>Sorry, your request nothing has been found! - <?php bloginfo('name'); ?><?php } ?> |
10 |
<?php if ( get_query_var('page') ) { print ' - Part ' . get_query_var('page'); } ?> |