<?php
require TPLCURROOT.'tpl/single_nextprev.php';
?>
-------------简单的:-------
<div class="dmpageprevnext">
<?php
// echo '<br>';
echo '<div class="">';
next_post_link('上一页:%link');
echo '</div><div class="">';
previous_post_link('下一页:%link');
echo '</div>';
?>
</div>
----------另一种---------------------------
<?php
// 获取上一篇(按日期更早的产品)
$prev_product = get_adjacent_post( false, '', true, 'catepro');
// pre($prev_product);
// 获取下一篇(按日期更新的产品)
$next_product = get_adjacent_post( false, '', false, 'catepro');
?>
<div class="col-12 wow fadeInUp mt-1-9" data-wow-delay="200ms">
<div class="page-navigation rounded mb-8 mb-md-9 mb-lg-10">
<div class="prev-page">
<div class="page-info">
<?php
if ($prev_product) {
?>
<a href="<?php echo get_permalink($prev_product)?>">
<span class="image-prev">
<?php
echo get_the_post_thumbnail( $prev_product->ID, 'thumbnail', array( 'class' => 'alignleft' ) );
?></span>
<div class="prev-link-page-info">
<h4 class="prev-title"><?php echo get_the_title($prev_product)?></h4>
</div>
</a>
<?php } ?>
</div>
</div>
<div class="next-page">
<div class="page-info">
<?php
if ($next_product) {
?>
<a href="<?php echo get_permalink($next_product)?>">
<div class="next-link-page-info">
<h4 class="next-title"><?php echo get_the_title($next_product)?></h4>
</div>
<span class="image-next">
<?php
echo get_the_post_thumbnail( $next_product->ID, 'thumbnail', array( 'class' => 'alignleft' ) );
?>
</span>
</a>
<?php } ?>
</div>
</div>
</div>
</div>