Current date (GMT): May-18 (Friday)   
SEO for Paged Comments
Written by Lee Ng.   
Tuesday, 02 February 2010 01:36

The paged comments feature new in WordPress 2.7 is handy for reducing page size, but it introduces the search engine optimization (SEO) problem of putting the same content on different permalinks, as some have pointed out.

That’s because the complete post would appear at all of these permalinks:

http://example.com/my-post-permalink/
http://example.com/my-post-permalink/comment-page-1/
http://example.com/my-post-permalink/comment-page-2/

My solution in this short plugin is to have all but the main permalink show an excerpt of the post, with a link back to the permalink page.

http://www.pressedwords.com
 */

function seo_paged_comments_content_filter($t = '') {
	if ( function_exists('get_query_var') ) {
		$cpage = intval(get_query_var('cpage'));
		if ( ! empty( $cpage ) ) {
			remove_filter('the_content', 'seo_paged_comments_content_filter');
			$t = get_the_excerpt();
			$t .= sprintf('

%2$s

', get_permalink(), get_the_title()); } } return $t; } add_filter('the_content', 'seo_paged_comments_content_filter');
Installation:
  1. Upload seo-for-paged-comments.php to the /wp-content/plugins/ directory, or its own sub-directory
  2. Activate it through the 'Plugins' menu in WordPress

Download

 

Comments 

 
#1 zerveptiz 2012-04-19 05:53
I found your weblog website on google and test a number of of your early posts. Continue to maintain up the very good operate. I just further up your RSS feed to my MSN Information Reader. Searching for ahead to reading extra from you in a while!??В¦ =-=
Quote
 

Add comment


Security code
Refresh