Duplicate content is a serious issue for all WordPress blogs, and most bloggers now employ different methods to show partial content. The only blogs with good search rankings which employ full posts, are usually authority blogs, which are labelled as safe and authoritative by Google’s algorithm.
Plugins are a popular method to reduce duplicate content. However, plugins are not fully optimized, and consumes more server resources than the simple <?php the_excerpt() ?>
tag. Moreover, excerpt tag can use the customized post summary that you may have written.
In this short tutorial, you should have all the template files in one place. Once you have those files(probably downloaded from your server, or a local copy that you keep), follow these easy steps:
- Open up
index.php
,archive.php
andsearch.php
- In each of these files, search and find the code bit that contains
<php the_content
- Replace the entire tag – usually <?php the_content(__(’Read the rest of this entry’));?> (may change depending on theme, but will be similar), with this tag:
<?php the_excerpt();?>
Save the files. - Open up
index.php
again, and save it ascategory.php
(do not discardindex.php
).
In the above steps, we have replaced the content tag with the excerpt tag so that only a short paragraph of the post is shown on pages other than the post page. Most themes lack a category.php
, and its absence can allow full posts on category pages. By duplicating the index.php
file(which has excerpt tag), that problem is also solved.
Open Mic
How do you prevent duplicate content? Do you use this method, or any plugins? If so, why do you prefer it over the excerpt tag?(I’d like to hear, as I am myself confused at which method to choose). Do tell me your views through comments.