Site icon League WP

Display “Next Post” Links Above/Below Comments Section in Genesis

If your website is running on Genesis Framework, you can show a Next Post link prominently under or above your comments section in order to allow your site visitors to navigate to the next post easily.

Whether you want to show it below the comments or above the comments section is entirely up to you and your design principle.

Using Genesis Hooks, you can change the position of the Next Post links and then add some CSS code snippet to let it complement your theme.

In this post, I’m going to show you how to do it.

Before I get started with the code, I’d like to show you some screenshots so you know exactly what to expect from this tutorial.

I’ve used Genesis Sample Theme for the test. Here are the screenshots.

Next Post Links below the Comments Section

Next Post Links above the Footer Widget

Show Me the Code

Case #1: If you want to display Next Post Links below the Comments Section.

Add the following code snippet to the functions.php file inside your active theme. (I’m assuming you’re going to use an FTP client for this for safety purpose.)

Add the following CSS code snippet to your style.css file inside your active theme.

Case #2:If you want to display Next Post Links above the Footer Widget.

Add the following code snippet to the functions.php file inside your active theme. (I’m assuming you’re going to use an FTP client for this for safety purpose.)

Use the same CSS code snippet used in the last example.

Note: You may need to tweak the CSS code as per your theme design.

Do you want to relocate your Next Post links?

You can relocate your Next Post links practically anywhere within your page template as long as it makes sense to your site visitors.

Before you do this, I’d advise you to install the Genesis Visual Hook Guide plugin and find out the exact hook location.

Here’s a screenshot of the plugin at work. It shows me a couple of available locations around the comments section where the Next Post can be relocated.

If you carefully notice the PHP code snippets in the examples above, you should notice the hook in the add_action. While it’s ‘genesis_after_comments’ in the first example, it’s ‘genesis_before_footer in the second example. You can simply replace these hooks with any other available hooks (using Genesis Visual Hook Guide plugin) as per your choice and relocate the Next Post links over there.

I hope you find this useful.

Please, let me know if you have any questions.

Exit mobile version