只需要下一个按钮,这将导致下一个和以前的博客


only need next button which would lead to next and previous blogs

我正在使用wordpress.我已经创建了博客.在这里我使用显示上一个和下一个链接

<div id="bottom_prev">
<?php previous_posts_link('Previous') ?>
</div>
<div id="bottom_next">
<?php next_posts_link('Next') ?>
</div>

但我不想要上一个,只需要下一个。我喜欢链接"next",它将指向上一个和下一个博客.这意味着下一个按钮需要以循环方式工作

我认为这应该适合你 -

<?php 
if( get_next_posts_link() ) 
{ 
next_posts_link('next'); 
} 
else 
{ 
echo '<a href="' . home_url( '/' ) . '" title="home again">back to beginning</a>'; } 
?>

你需要设置条件

<?php 
if( get_next_posts_link() ) 
{ 
next_posts_link('next'); 
} 
else 
{ 
echo '<a href="' . home_url( '/' ) . '" title="home again">back to beginning</a>'; } 
?>