How to Remove Previous and Next Link from a Single Blog Post?

If you wish to remove the navigation (Previous and Next) links from the single blog post, this article is for you.

The navigation links can be removed with the filter. Below is the code for the required filter-

add_filter( 'astra_single_post_navigation_enabled', '__return_false' );

Where should I put this code?

We recommend you to put the filter code in the child theme’s functions.php file. Below are the steps that explain how to put the custom code into the child theme’s functions.php-

  1. Install and activate Astra Child Theme.
  2. Open your WordPress site via FTP. We would recommend you to use FileZilla.
  3.  Navigate to wp-content > themes > astra-child
  4.  Right click functions.php and select View/Edit
  5. Add your code at the bottom of the file and save it.

It will remove the navigation link from all single blog post.

Not the solution you are looking for? Check other articles, or open a support ticket.