WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove adjacent_posts_rel_link links under WP3.2 (3 posts)

  1. 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?

  2. Elpie
    Member
    Posted 3 years ago #

    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.

  3. 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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.