bp_remove_adjacent_posts_rel_link()

Remove “prev” and “next” relational links from <head> on BuddyPress pages.


Description Description

WordPress automatically generates these relational links to the current page. However, BuddyPress doesn’t adhere to these links. In this function, we remove these links when on a BuddyPress page. This also prevents additional, unnecessary queries from running.


Source Source

File: bp-core/bp-core-functions.php

function bp_remove_adjacent_posts_rel_link() {
	if ( ! is_buddypress() ) {
		return;
	}

	remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.