WordPress Blog Home How to display the article summary

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

After publishing my 3rd article "Chinese site search engine & URL Directory submission Login entry (2010 summary)", suddenly found that this article in the home page is the full text display, and most of the blog is the first page only show a summary, so you can display more than one article, at the same time the home page layout shows more beautiful.

There are two main ways to adjust, add plug-ins in the template modified, or directly use more tags.

The first method is simpler:
Inserts more labels in HTML editing state. More label shown as:<!––more––>

Add more Label

The second method: directly modify the template

Yesterday my template did not know what the situation, suddenly more labels on the display is not normal, but under the second slightly more complicated method, and the experiment was successful. In the WordPress system, the default home page and table of contents are used in full text output, which is very inconvenient for the blog with longer content.

<?php if (is_category () | | | is_archive () | | is_home ()) {
The_excerpt ();
else {
The_content (' Read the rest of this entry &raquo; ');
}?>
<div><div><?php Comments_popup_link (' No comments ', ' 1 Comment ', '% comments ');?> so far | <a href= "<?php the_permalink ()?>" >read on &raquo;</a></div></div>

At this time, the WordPress home page and classification is displayed as summary information rather than full-text information. PS: The red part can be replaced with the text you need.

This code can be in your home page, archive pages, catalog pages using the summary output, the use of summary output, the entire WordPress repeated content is much less, is conducive to search engine optimization.

"Tangut Network Promotion Growth Blog" This article Address: http://www.isongxia.com/more-tag.html (reprint please keep)

first find wp-content/themes under the template directory you use to find the files in the directory, if there are home.php modify home.php, no words to modify index.php, find &lt;?php the_content ();? &gt; This line, modify it to the following code:
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.