Hey everyone,
I have this code:
<?PHP
$current = get_permalink();
$prevPost = get_previous_post(true);
$prevURL = get_permalink($prevPost->ID);
$nextPost = get_next_post(true);
$nextURL = get_permalink($nextPost->ID);
?>
<map name="Map" id="Map">
<area shape="circle" coords="142,43,40" href="<?php echo get_settings('home'); ?>" /> <!-- Home button -->
<area shape="circle" coords="343,43,37" href="../restaurants/" /> <!-- Back to category button -->
<area shape="circle" coords="829,43,39" href="<?php echo $nextURL ?>" /> <!-- Back button -->
<area shape="circle" coords="1147,43,39" href="<?php echo $prevURL ?>" /> <!-- Next button -->
</map>
It works 100%.
But what I need help with is I want it to loop back to the first/last post in the category it's listing rather than just when it gets to the final post, just refreshing that post over and over?
Or is there a way to pick up that it is the last and first post post so I can change the image and remove the MAP link?
Thanks in advanced!
Michael.