WordPress函数the_excerpt()显示文章摘要/描述

描述:

显示当前文章的摘要

用法:

 <?php the_excerpt(); ?> 

参数:

None

示例:

<?php if ( is_category() || is_archive() ) {
	the_excerpt();
} else {
	the_content();
} ?>

源文件:

/**
 * Display the post excerpt.
 *
 * @since 0.71
 */
function the_excerpt() {

	/**
	 * Filter the displayed post excerpt.
	 *
	 * @since 0.71
	 *
	 * @see get_the_excerpt()
	 *
	 * @param string $post_excerpt The post excerpt.
	 */
	echo apply_filters( 'the_excerpt', get_the_excerpt() );
}