点击wordpress中的图像时,是否可以显示下一篇文章?
我尝试过这个,但它对我不起作用。。。请帮我提前谢谢你点击wordpress中的图像时,是否可以显示下一篇文章?,wordpress,Wordpress,我尝试过这个,但它对我不起作用。。。请帮我提前谢谢你 <?php $next_post = get_next_post(); if (!empty( $next_post )): ?> <?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?> <a href="<?php echo get_permalink( $next_post->
<?php $next_post = get_next_post(); if (!empty( $next_post )): ?>
<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
<a href="<?php echo get_permalink( $next_post->ID ); ?>"> <img src="<?php echo $url; ?>" />
<?php echo $next_post->post_title; ?>
</a>
<?php endif; ?>
任何人都知道怎么做。Muddasir
试着这样做:
下一个职位
上一个职位
<?php next_posts_link('<img src="imageURL.com/next.png" />'); ?>
<?php previous_posts_link('<img src="imageURL.com/previous.png" />'); ?>