i try this but its not working for me… please help me thank you in advance
<?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; ?>
is any one knows how to do this.
Muddasir,
Try something like this:
For the next post
For the previous post