Anchor Links/Jump Links

This little snippet of code will generate ‘jump links’ to each ‘Next Post’ on a page.

<?php if (!$jumpcnt) $jumpcnt = 0;
   echo "<a name='jump$jumpcnt'></a>";
   ++$jumpcnt;
   echo "<a href='#jump$jumpcnt'>Next Post</a>";?>

Leave a Reply

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

*