How to paginate WordPress like Dribbble

Just paste the code below on your single.php file, where you want to display the dribbble-like pagination:

<?php $prev = get_previous_post(); $next = get_next_post();
						
	<div class="float--left folio">
		<a href="<?php echo get_permalink($prev->ID); ?>" title="<?php echo esc_attr($prev->post_title); ?>">
			<?php echo get_the_post_thumbnail($prev->ID, 'thumbnail'); ?>
		</a>
	</div>
						
	<div class="float--right folio">
		<a href="<?php echo get_permalink($next->ID); ?>" title="<?php echo esc_attr($next->post_title); ?>">
			<?php echo get_the_post_thumbnail($next->ID, 'thumbnail'); ?>
		</a>
	</div>

This recipe has been submitted by Elliott Richmond. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *