In this article I share how get_adjacent_post() can be used to display links to previous and next entries on single Post pages and single entries of a particular 'movies' CPT in Genesis. Summary: a) The navigation links are going to remain fixed and always visible. b) jQuery is used to calculate the number of pixels by which the previous and next entry links should be pushed off the screen edge (in regular state) in left and right directions respectively. c) When hovered, the previous link will slide to the right to reveal the previous entry's title and the next link will slide to the left to reveal the next entry's title. d) On handhelds (tablets and mobiles), the links will appear in the 'traditional' way: at the bottom of the entries. Screenshots: Screencast:
Step 1Create a file named sitewide-non-handhelds.js in your child theme's js directory having the following:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.