Genesis. It’s the framework that thousands of WordPress website developers prefer to use, including me. I use it for every website project that I can.
I want to show you how to make it easier for your users to browse through your blog posts and stay on your website longer. Making it easier for users to go through different posts easily makes for better usability. It also creates internal linking, which helps with SEO.
If you have a custom theme, simply paste the function below into your functions.php
file. If you’re using a prebuilt theme, use the My Custom Functions plugin and paste it in there.
The code above positions the next post and previous post links right before the Comments section. You can use virtually any Genesis hook, as long as it makes sense, to place it where you’d like.
Style The Next/Previous Post Links
You can use your browser’s Developer Tools to inspect how I style mine. I use a couple different selectors to globally align things, as well as flex-box
to align the entire section.
Other Genesis Related Posts
- Change Class, ID, Itemtype, and other Attributes in Genesis
- Change Entry Title Post Links on Archives in Genesis
Tagged with: functions, genesis, navigation, seo, user experience, wordpress
What do you think?
Do you have something to say about this post? Give us your opinion, insight, changes, or alternative way of doing something. We'd love to hear from you!
Salvation
Thanks for the information – it’s a great stuff. I would like to ask for help. My theme site’s theme does not have previous and next post likes as other themes have.
I would like to add Previous and Next post links to my site. However, I would like to display them like this:
Previous Post Next Post
Whereby the ‘Previous Post’ is a link to the previous post and ‘Next Post’ is a like to the next post. I do not want to display the titles of the posts as others do. Can you help me with a line of code – WordPress php code.