How to Remove Previous Next Post Links in WordPress

Remove Previous Next Post Links in WordPress

Another post on the topic of cleaning WP from unnecessary garbage. This time we will analyze how to remove Prev Next WordPress – links to the previous next post.

Why remove Prev and Next links?

WP adds meta tags in the <head> section that serve as links to links to the previous/next post.

<link rel="prev" href="" />
<link rel="next" href="" />

These links are not needed. This is due to the fact that there is pagination at the end of the site. These URL links are needed by external services, with the help of which the administrator can work with the site’s admin panel remotely.

Also see: How to add code to the head of WordPress

How to remove links to previous/next post?

Let’s take a look at all the ways.

Method 1. Manually

The method can be used by those who do not want to install additional WordPress extensions.

Just open the /wp-content/themes/theme_name/functions.php file and add the line at the very end

remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 );

Method 2: Clearfy Pro Plugin

Clearfy Pro is a multifunctional premium solution that will remove links to the previous, next post in one click.

To do this, select Clearfy Pro > Basic in the admin panel and on the Code tab activate the item Remove links to the previous, next entry. Don’t forget to click Save Changes.

Method 3: Remove WordPress Overhead Plugin

Once installed and activated, go to Settings > Remove WP Overhead and enable the Remove Next & Prev Post Links setting.

For the changes to take effect, click Save Settings.

Leave a comment

Your email address will not be published. Required fields are marked *