You may have observed that on some blogs, a reader can navigate to next and previous posts with right and left keys. Navigating the site by using these keys adds more convenience to the visitor of your site. Instead of navigating to next and previous post manually, a keyboard shortcut really comes in handy. In this post, you will learn how to add next and previous navigation with the help of right and left keys.
Here’s a WordPress plugin named as jcwp left right key navigation. This is a simple plugin that enables left and right key post navigation in WordPress.
Once installed, you can see the Next and Previous buttons in the front-end of your site. You can configure this plugin from Settings > JCWP Left Right Key.
From here, you can disable the left and right key navigation, create next and previous link from the same category, change labels for next and previous posts and set minimum screen resolution for links to be displayed.
The “Create Next/Previous link from same category” option is very useful if you want to fetch new posts from the same category.
Now let’s see how this plugin works in the front-end. Press the right key once and then a title of the next post is displayed. Press the right key again and then the user is taken to the next post.
Same way, when the left key is pressed once, it displays the title of the previous post. When the left key is pressed twice in a row, then the user is taken to the previous post.
When you want to hide the next/previous post title preview, you can press ESC or any other key.
You can instruct your site visitors that they can now navigate to the next post or previous post by using the right and left keys respectively.