You can now use your keyboard’s left and right arrow keys to browse a gallery! Just click on any photo in your gallery (like this one), and navigate to the next one with your keyboard. It’s a new feature that is automatically built in to each gallery.
However, the fun doesn’t stop there. With a little bit of eyelash-batting, I was able to get our dev team to share the secret. With a few simple theme hacks, you can now build left/right arrow navigation into your blog (you can see it in action at the Daily Sabs). To add the feature, just place the following bits of code to the "Page" template of your theme.
Directly above the </body> tag add this code:
<script type="text/javascript">
onsugarInitSlideKeys();
</script>
And then add links for previous and next by using the following bits of code (you can change the bit that says "Go Back" and "Go Forward" and can place these links anywhere below the <body> tag and above the script code):
<a id='slide_previous' href="?page={$page_previous_page}">Go Back</a>
<a id='slide_next' href="?page={$page_next_page}">Go Forward</a>
Save your theme, and you should be set!
Remember, this is just a fun hack and it make take some tweaks to get it working right. If you need a hand, drop us a line at help@onsugar.com.


You guys are AMAZING I defintiely want to add this to my site as I send individual posts to those in PR that I have posted about their product. It would be nice to have that next post or previous post so that they can see other goodies without hoping that they will remember to click the top of the page to go back to the beginning!