Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
点击wordpress中的图像时,是否可以显示下一篇文章?_Wordpress - Fatal编程技术网

点击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" />'); ?>