WordPress Twenty Seventeen主题修改

主页显示摘要

修改index.php

/* Start the Loop */
while ( have_posts() ) :
	the_post();

	/*
	 * Include the Post-Format-specific template for the content.
	 * If you want to override this in a child theme, then include a file
	 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
	 */
	get_template_part( 'template-parts/post/content', get_post_format() );

修改为

/* Start the Loop */
while ( have_posts() ) :
	the_post();

	/*
	 * Include the Post-Format-specific template for the content.
	 * If you want to override this in a child theme, then include a file
	 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
	 */
	get_template_part( 'template-parts/post/content','excerpt', get_post_format() );

归档页面显示摘要

修改 achieve.php

/* Start the Loop */
while ( have_posts() ) :
	the_post();

	/*
	 * Include the Post-Format-specific template for the content.
	 * If you want to override this in a child theme, then include a file
	 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
	 */
	get_template_part( 'template-parts/post/content', get_post_format() );

修改为

/* Start the Loop */
while ( have_posts() ) :
	the_post();

	/*
	 * Include the Post-Format-specific template for the content.
	 * If you want to override this in a child theme, then include a file
	 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
	 */
	get_template_part( 'template-parts/post/content','excerpt', get_post_format() );

发表评论

电子邮件地址不会被公开。 必填项已用*标注

*
*