这是二十七年的主题。这是在header.php中,它直接在特色图像调用下面调用。
使用下面的代码,只显示下一个链接,并在每个帖子上提供我日期最早的帖子的静态永久链接。这里的特色图片工作正常。
<?php
// If a regular post or page, and not the front page, show the featured image.
if ( has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) ) :
echo '<div class="single-featured-image-header">';
the_post_thumbnail( 'twentyseventeen-featured-image' );
next_post_link( '%link', 'Next post in category', TRUE );
previous_post_link( '%link', 'previous post in category', TRUE );
echo '</div><!-- .single-featured-image-header -->';
endif;
?>
HTML输出:
<div class="single-featured-image-header">
<img width="1920" height="1080" src="http://website.com/wp-content/uploads/2017/05/image.jpg" class="attachment-twentyseventeen-featured-image size-twentyseventeen-featured-image wp-post-image" alt="" />
<a href="http://website.com/post" rel="next">Post Title <span class="meta-nav">→</span></a>
</div><!-- .single-featured-image-header -->
我需要协助确定应用此逻辑的位置。