Support » Plugins » Hacks » Remove adjacent_posts_rel_link links under WP3.2

  • ResolvedModerator Mark Ratledge


    Forum Moderator

    I’m trying to remove the adjacent_posts_rel_link links under WP3.2, i.e. remove these from being added by wp_head in header.php:

    <link rel='prev' title='blah blah' href='http://...' />
    <link rel='next' title='blah blah' href='http://...' />

    and this function used to work under 3.1:

    function remove_header_info() {
    remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
    add_action('init', 'remove_header_info');

    But doesn’t under 3.2. Anyone know or know how to find the new action to remove the links?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Elpie


    You don’t need a function, just add this to your theme’s functions.php

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

    Note the change to adjacent_posts_rel_link_wp_head in 3.2.

    Moderator Mark Ratledge


    Forum Moderator

    Ah, the change to adjacent_posts_rel_link_wp_head is the key. Thanks! I use a function as I remove a bunch of other links from head.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove adjacent_posts_rel_link links under WP3.2’ is closed to new replies.