WordPress Next Post/Previous Post hide

[Keni Theme][WordPress] Hide Next/Previous Post Page Navigation

A detailed explanation of how to hide page navigation such as 'Next Post' and 'Previous Post' in the WordPress Keni theme.

Shou Arisaka
1 min read
Sep 30, 2025

This article explains how to hide page navigation such as “Next Post” and “Previous Post” on WordPress sites using the Keni theme.

Procedure

  1. Edit the single.php file

    First, open the single.php file in your theme directory. This file defines the layout of single post pages.

  2. Delete the target code

    Find and delete the following code section:

    <div class="page-nav-bf cont-nav">
    <?php
        echo $next_link . "\n";
        echo $prev_link . "\n";
    ?>
    </div>

    By deleting this code, the links for next and previous posts will no longer be displayed. This also prevents the generation of unnecessary div elements with classes.

Notes

  • Delete instead of commenting out

    Avoid commenting out code that mixes PHP and HTML. By completely deleting the code, you can avoid unintended errors and problems.

By implementing this method, you can completely remove page navigation from single post pages in the Keni theme. Edit other template files in the same way as needed.

Share this article

Shou Arisaka Sep 30, 2025

🔗 Copy Links