WordPress Excerpt Seo Tips

贝贝博客 10.05.05 网站建设 631 0 条(抢沙发)
Foxalt工作室 T4主题

WordPress Excerpt Seo Tips

        Wordpress blogs have duplicate content issues, and one of them is allowing reading the same content on both the posts, index page, archives and categories pages. To avoid search engine penalty it is important to optimize your Wordpress using Wordpress excerpt so that duplication will be avoided.

Instead of duplicating the whole content, you may use just an excerpt in the index, archives and categories pages. The WordPress displays the excerpt of the current post with [...] at the end, which is not a “read more” link. If you do not provide an explicit excerpt to a post (in the post editor’s optional excerpt field), the first 55 words of the post’s content are used.

To use Wordpress excerpt function, you may replace the_content() tag with the_excerpt() when on archive (tested by is_archive()) and category (is_category()) pages and index (is_home()) page in WordPress themes.

Now that you are in the correct section, locate the following piece of code:

<div class="entry">
<?php the_content('Read the rest of this entry &raquo;'); ?>
</div>

You are going to replace that entire piece of code with the following:

<div class="entry">
 <?php if(is_category() || is_archive() || is_home() ) {
  the_excerpt();
 } else {
  the_content('Read the rest of this entry &raquo;');
 } ?>
</div>

Of course, this example uses the WordPress default template, but the same code can be used on most any template if you find the index.php or main index page and the spot where <?php the_content(); ?> is in the code.

相关文章

Foxalt工作室 T4主题

(¬_¬) 还不快点抢沙发!!!

联络贝贝