Filters the rel attribute for the Related Posts’ links.
Parameters
- $link_rel
string Link rel attribute for Related Posts' link. Default is empty.
- $post
int ->ID Post ID.
Changelog
- Introduced in Jetpack 3.7.0
How to use this hook
Notes
You can use this filter to disable thenofollow attribute that’s added to Related Posts by default. To do so, use the following snippet:
function jeherve_custom_rp_rel( $rel, $post_id ) {
return '';
}
add_filter( 'jetpack_relatedposts_filter_post_link_rel', 'jeherve_custom_rp_rel', 20, 2 );