Support » Fixing WordPress » Remove rel=”next” from the code

  • ashashko

    (@ashashko)


    I would like to delete this code from the website
    <link rel="next" href="http://site.ru/page/2" />

    I found out, that this code is shown by the Yoast SEO plugin
    // add_action( 'wpseo_head', array( $this, 'adjacent_rel_links' ), 21 );
    – as the temporary solution I hid this code from the plugin.

    I tried to switch off it from the functions.php file with the next code
    remove_action('wp_head', 'adjacent_rel_links', 21)
    – but it didn’t work.

    Any suggestions?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Joy

    (@joyously)

    Why would you want to undo what the SEO plugin is doing? That link helps the search engine know the relationship of the two pages.

    When you call remove_action, you have to give it the exact same arguments as the add_action call. So you have to have a reference to the class and pass it as an array.

Viewing 1 replies (of 1 total)
  • The topic ‘Remove rel=”next” from the code’ is closed to new replies.