WordPress tip: Add page numbers to blog titles to reduce duplicate titles

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

I believe we all know the blog built with WordPress, if the author's theme does not take into account the site optimization, then use such a theme will be very unfavorable to the search engine included. One of the most common situations is when a category has several pages, the page title of each page repeats, which is the same title.

If you do not know how to know how many duplicate titles of your site, then suggest you use Google Webmaster tools to view, which will be detailed list of your site Repeat title page, use the method here will not be introduced. To solve the Web site repeat title method, is usually after the title plus the first few pages such an identification, the effect of the following figure:

  

If you want to achieve this effect, just add a piece of code to the template you're using, and the code is as follows:

< php $paged = Get_query_var (' paged '); if ($paged > 1) printf (' – Page%s ', $paged);? >

If you are not very clear, you can see how I added in my template, as follows:

<?php if (Is_home ()) {><title><?php bloginfo (' name ');?> | <?php bloginfo (' description ');? >&l t;? PHP $paged = Get_query_var (' paged '); if ($paged > 1) printf (' – Page%s ', $paged);? ></title><?php}?

Here I will no longer say anything in detail, if you do not understand, I suggest you think more, only the brain can learn more about WordPress.

This article is reproduced by www.hzsimu.cn please keep

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.