get_the_post_thumbnail
-
Hi I’d like to modify this code to check to see if there’s a featured thumbnail, and if no thumbnail use a default image. Any ideas?
<?php $nextPost = get_next_post(false);
if($nextPost) { ?>
<div class=”nav-box-next”>
<div class=”nexttitleText”>Next Post </div>
<?php $nextthumbnail = get_the_post_thumbnail($nextPost->ID,thumbnail); ?>
<?php next_post_link(‘%link’,”$nextthumbnail”, false);?>
<p><?php next_post_link(‘%link’,”%title”, false);?> </p>
</div> <?php } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘get_the_post_thumbnail’ is closed to new replies.