Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joshuacharleslake/c9532bef0f4ac84d23f7 to your computer and use it in GitHub Desktop.
Save joshuacharleslake/c9532bef0f4ac84d23f7 to your computer and use it in GitHub Desktop.
remove actions wordpress for wp_head
remove_action( 'wp_head', 'feed_links_extra', 3 ); // This is the main code that removes unwanted RSS Feeds
remove_action( 'wp_head', 'feed_links', 2 ); // Removes Post and Comment Feeds
remove_action( 'wp_head', 'rsd_link' ); // Removes link to RSD + XML
remove_action( 'wp_head', 'wlwmanifest_link' ); // Removes the link to Windows manifest
remove_action( 'wp_head', 'index_rel_link' ); // Removes the index link
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Remove relational links for the posts adjacent to the current post.
remove_action( 'wp_head', 'wp_generator' ); // Remove the XHTML generator link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment