最好的方法是创建一个子主题,以便在对2017主题进行更改并使用存储库更新主题时,您的更改不会丢失。
How to create a child theme
然后转到主题文件夹/模板部件/帖子/内容。php
近似编辑第54行以添加本机函数get\\u the\\u post\\u thumbnail();至div.entry-content
下面是代码
<div class="entry-content">
<?php
get_the_post_thumbnail();
/* translators: %s: Name of current post */
the_content( sprintf(
__( \'Continue reading<span class="screen-reader-text"> "%s"</span>\', \'twentyseventeen\' ),
get_the_title()
) );
wp_link_pages( array(
\'before\' => \'<div class="page-links">\' . __( \'Pages:\', \'twentyseventeen\' ),
\'after\' => \'</div>\',
\'link_before\' => \'<span class="page-number">\',
\'link_after\' => \'</span>\',
) );
?>
</div><!-- .entry-content -->