Duplicate content is always an issue in search engines, especially in the context of content management systems and blogging applications. Therefore, they decided together (Google, Yahoo and Microsoft) for a notice using the link tag.
In essence, provides the tag with the rel attribute canonical only a reference to the preferred URL. Once again a new discussion started in the WP Hacker List about this new possibility, which I can not understand. WordPress offers plenty of opportunities so that this form is not necessary to be included in the core, there is sufficiently different and more important topics and the content of a theme should be broadly still lie with the developer. I will show you in this post a simple and quick way to integrate the attribute.
Without getting in details and to enter the SEO world, I will pass on some links, which sufficiently explained the issue with enough background on this topic. Useful and concise is the article „Specify your canonical“ and Yoast provides information and a Plugin on this topic.
As always, you can use various Plugins or expand your theme for indication for the search engines. The second possibility is shown below in my favorite code.
The above code has to be in the
head of the theme, usually in the
header.php of the theme and you’re done. From now, every single page and post has the notice on the preferred URL. For the query of page or post takes care the Conditional Tag
is_singular() since WordPress version 1.5 in the core.