Created
March 19, 2012 16:10
-
-
Save sloped/2117555 to your computer and use it in GitHub Desktop.
Remove relational links from Wordpress wp_head()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Sometimes you don't need or want the relational links in Wordpress. Especially if you have pages in Wordpress you don't want to be public. Call with after_setup_theme action hook. | |
*/ | |
function remove_rel_links() { | |
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); | |
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); | |
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment