Posted By

DarkPepe on 12/04/09


Tagged

pages wordpress content comment duplicate comments thecontent


Versions (?)

Change the_content to excerpt on comment pages (Wordpress)


 / Published in: PHP
 

URL: http://www.lagzero.net

This helps to avoid the "duplicated content" indexation by google on wordpress comment pages by changing the post content to the_excerpt ONLY in comment pages.

  1. <?php if ( function_exists('get_query_var') ) {
  2. $cpage = intval(get_query_var('cpage'));
  3. if ( empty( $cpage ) ) : ?>
  4. <?php the_content('ContinĂșa Leyendo'); ?>
  5. <?php else: ?>
  6. <?php the_excerpt(); ?>
  7. <?php endif; ?>
  8. <?php }; ?>

Report this snippet  

You need to login to post a comment.