How To Eliminate Duplicate Content in WordPress Up To 99%

SEO Tutorials | December 4th, 2007 | 8 Comments

As I previously wrote on why you should eliminate duplicate content and what are the benefits to have as less as possible duplicate content within your site (and especially in blogs that use WordPress as blogging platform) to give more weight to inner pages, today I am going to write this tip for bloggers how to eliminate duplicate content in wordpress. To make the changes is required that you have minimal HTML and PHP knowledge and understanding.

Thanks to the user friendly platform which WordPress has, modifying and tweaking it becomes easier. What it requires is just small modifications in your wordpress theme homepage in the php loop code that calls the posts and applying a small fix for duplicate content hack code for wordpress.

To make this tutorial easier for me to use I will use snapshots of code instead of writing the whole code (the important parts I will write them for easier copy), so lets see how the standard loop call code would look in your themes index.php file.

WordPress Original Index Loop

If you notice the line 8 is highlighted, that is the loop that “calls” and “displays” the post and thats how the PHP code will look out of the box as you install wordpress (as far as it regards the html markup that depends from theme to theme). Lets say we haven’t modified the theme at all, and we are using it out of the box as the designer of the theme uploaded it for free download. We have set up the number of the posts we want to be displayed in the homepage of our blog for the Options > Reading to 5 posts, at the moment we write the sixth post you will notice in your blogs homepage a new menu appearing, it could be “Older Posts” “Previous Posts” or a numerical menu as I am using at the bottom of the homepage. This secondary page of the homepage, with a loop like the one above in the image will display a full post as well, just as in the homepage, so even if the post is out from the homepage and you might be thinking that you have resolved the problem of the duplicate content for your post but you are wrong, as the post will be than visible in the “secondary page of the homepage”, using the wordpress duplicate content hack we resolve this problem immediately as we will create an “excerpt” of our post in the secondary pages instead of a full post. So lets see how would the loop code look like if we’d implement this hack.

Duplicate Content Fix Hack

(Had to stretch the image, otherways it was going to break the layout)

If you can notice (in the stretched image) the select code from line 6 down to line 15, that is how your loop code would look after adding the duplicate content fix for wordpress. The code will display full posts (or excerpts, depends how you have made the settings to display posts in homepage) in the first page of your blog while in the “secondary pages of the homepage” it will display an excerpt of 300 characters (note, on line 12 you will notice 0, 300); changing 300 to 400 or 500 will change the number of characters you want the excerpt to show).

In the archives (and categories) file (usually called archive.php) if the loop code looks like this <?php the_content() ?> which should be displaying the full content of the post, change it into <?php the_excerpt() ?>. By making this change in the archives and categories page you will be displaying ONLY the excerpt of the post, so another duplicate content eliminated from within our blog. But there is still one small problem left.

Using excerpts code it will write excerpt of the first 300 or 400 characters of our blog post, so we still have a part of our content as duplicate (even tho it is simply a teaser). Lets take a snapshot and see how it looks.

Example 1
Duplicate Excerpt
This is how is link exchange dead posts excerpt looks like in the homepage. Did you notice something over there? In case you didn’t, lets take another screen shot of the posts page.

Example 2
First 400 characters duplicate of content
Now do you notice? The first 400 characters of the content are the same as the one used in the homepage excerpt. Not that eliminating this will make a big difference (but who can really tell), but why I would not want that to be displayed in the homepage is because how I want to start a post would be totally different from what I would want the teaser to look like in the homepage (if I’d have to write a teaser).

Can we change how the teaser should look like? Sure thing (thank you WordPress). In the write page when you are writing the post, if you’d scroll a little you will find a box called Optional Excerpt. Writing a optional excerpt in that box will be displaying as excerpt if you’d use the hacks mentioned above, you can use the excerpt as teaser and keyword rich important for the homepage of your site.

If you see SEO Optimization from the homepage you will notice excerpt of the eliminate duplicate content is totally different from the first 400 characters of the article. Here is a screenshot

Eliminate Duplicate Content Excerpt

By implement these hacks and spending just a little more time to write an Optional Excerpt for your title you will be eliminate by 99% the duplicate content WITHIN your site. Whoever wants to start doing SEO for his/her own website the first thing that he/she should be looking at is its own site. The roots of search engine optimization of a website start from within the site, the title, the heading tags, the internal linking, the duplicate content. Adjusting and optimizing all the above mentioned on page optimization factors will make sure you are prepared for the off site optimization which includes mainly, link building.

Hope this blogging tip makes sense to you and it will become of a good use for you, in any case, subscribe to my RSS feed if you want to read me daily.

Sharing is caring!

Article Marketing Robot

8 Responses to “How To Eliminate Duplicate Content in WordPress Up To 99%”
  1. PHP eBook says:

    When I saw your first article about ‘duplicate content’ I was thinking that there is no way that I have duplicate content – now I realize that each of my posts is on 2 or 3 different pages… I guess I will have to go through this and fix all that.

    Thanks… I think…

  2. […] magazine style that the homepage has makes so that the duplicate content has been already eliminated and you will not have to face with that issue anymore for your […]

  3. […] in looking at another way to remove duplicate content from your WordPress site, then take a look at How To Eliminate Duplicate Content in WordPress Up To 99% for a detailed […]

  4. […] the same content located on several parts of the blog, even for that I have blogged awhile ago on how to remove duplicate content from your wordpress blog. The main reason why you would not want to have the same content located […]

  5. james says:

    In regards to the duplicate content part of this blog post, I personally use the http://www.copygator.com website to find and stop duplicate content:

    1. it’s automated and brings me results instead of me searching for duplicated content. All i had to do was submit my feed and it started monitoring my feed showing me who’s republished my articles on the web.

    2. i get notified by email so it contacts me when it finds copies of my articles online.

    3. i use their image badge feature to alert me directly on my website when my content is being lifted.

    4. it’s a free service as opposed the “per page” cost of copyscape/copysentry.

  6. Bill says:

    dont you think Google will pick that up, i mean using simple maths its not difficult to detect portions like that.

  7. I used to publish my articles, but now I wander should I stop doing this, because the risk of duplicate content penalty. Should I stop publish my articles on article directories?

  8. @Introspective, if you are publishing identically the same article then yes you should stop doing that. What you should do instead is take your article and rewrite it , then publish the article you rewrote publish it on article directories, this way you will have incoming links from relevant in-content page and will keep your article as unique.

    Hope this helps.