Website Vidya
How-To GuidesStep-by-Step Guide

How to Add Next Previous Post Navigation Links in Genesis

Are you looking to add next previous post navigation links in Genesis? Many other brand themes include this feature by default. But if you are using Genesis Child themes, you need to customize your function.php file. In this tutorial, I am ...

RR
Rajesh RayLead Systems Educator
Published:
2 min read
How to Add Next Previous Post Navigation Links in Genesis
AI Executive SummaryCORE CIS AI

2 min read

Are you looking to add next previous post navigation links in Genesis? Many other brand themes include this feature by default. But if you are using Genesis Child themes, you need to customize your function.php file. In this tutorial, I am ...

Key Highlights
  • Add Next Previous Post Navigation Links in Genesis Child Theme
Grounded in full engineering runbookCORE CIS Ai Engine

Are you looking to add next previous post navigation links in Genesis? Many other brand themes include this feature by default. But if you are using Genesis Child themes, you need to customize your function.php file.

In this tutorial, I am going to use a couple of lines of code snippet that will help us add next previous post navigation links in Genesis child theme.

Thereafter, I will show you how to style your post navigation links using cascading stylesheet (CSS).

Add Next Previous Post Navigation Links in Genesis Child Theme

In order to implement this, open functions.php file of your Genesis child theme and add the following code:

Advertisement

The code above positions the next previous post navigation links in Genesis right before the Comments section. You can use the Genesis hook, as long as it makes sense, to place it anywhere on the single post you’d like.

Style The Next/Previous Post Links

Copy and paste the CSS code below in style.css file of the Genesis child theme:

.prev_next 
 {
     overflow: auto;
     margin: 10px 0;
     padding: 5px 0;
 }
 .prev_next span.next 
 {
     background-color: #333;
     padding: 10px;
     font-weight:700;
     text-transform:uppercase;
     display: block;
     margin-bottom: 5px;
 }
 .prev_next span.prev 
 {
     background-color: #333;
     padding: 10px; 
     font-weight:700;
     text-transform:uppercase;
     display: block;
     margin-bottom: 5px;
 }
 .prev_next a 
 {
     text-decoration: none;
 }
 .prev_next a:hover 
 {
     text-decoration: underline;
     font-weight: 600;
 }
 .nav_left 
 {
     width: 50%;
     float: left;
 }
 .nav_right 
 {
     width: 50%;
     float: right;
     text-align: right;
 }

If you are adding these next previous post navigation links in live mode, you can also use your browser’s Developer Tools option to inspect and style your links.

Moreover, if you don't want to modify the functions.php file, you can download a WordPress plugin called My Custom Functions. You just need to install and activate the plugin to get started.

My Custom Functions Plugin is easy to use, an intuitive WordPress plugin that gives you control over the custom PHP code. With just a few clicks, you can safely add your custom PHP code to your WordPress website without having to modify your functions.php file.

Advertisement

Here are the steps:

1. Navigate to the WordPress plugins repository, search and download "My Custom Function" plugin.

My Custom Functions -Install & Activate

2. Navigate to the Settings » PHP Inserter

My Custom Functions - PHP Inserter

3. Enter the PHP code » Turn on custom code functions and click save.

funtions file

So that’s it for now! I hope you will find this tutorial useful to add a little custom feel to your site.

RR
Written byVerified Author

Rajesh Ray

I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.

SPAM-FREE MODERATED DISCOURSE

Join the Conversation & Perspective

Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.

AT
MP
JV
+2

No comments on this guide yet. Be the first to share your thoughts or ask a question!

Recommended Reading10 Guides

Related Technical Guides

Tested runbooks, server administration walkthroughs, and troubleshooting guides

Featured Infrastructure PartnerUp to 75% OFF + 3 Months Free

Supercharge Your Linux & Cloud Workloads with Hostinger

Deploy high-speed NVMe KVM VPS, Docker containers, and LiteSpeed-accelerated WordPress servers in under 60 seconds with full root access, dedicated IPv4, and 24/7 technical support.

Pure NVMe SSD StorageFull Root Access & SSHFree Domain & Unlimited SSL99.9% Uptime SLA
Plans from$2.99/mo
Claim Hostinger DealAffiliate link • Special discount applied at checkout