Posted By

alp on 06/06/11


Tagged

wordpress head functionsphp


Versions (?)

Wordpress: Clean up the


 / Published in: PHP
 

URL: http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/

  1. /**
  2.  * Clean up the <head>
  3.  * http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/
  4.  *
  5.  **/
  6. function myfunction_remove_head_links() {
  7. remove_action('wp_head', 'wlwmanifest_link');
  8. remove_action('wp_head', 'wp_generator');
  9. remove_action('wp_head', 'rsd_link');
  10. remove_action('wp_head', 'index_rel_link');
  11. remove_action('wp_head', 'feed_links_extra', 3);
  12. remove_action('wp_head', 'start_post_rel_link', 10, 0);
  13. remove_action('wp_head', 'parent_post_rel_link', 10, 0);
  14. remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
  15. }
  16. add_action('init', 'myfunction_remove_head_links');

Report this snippet  

You need to login to post a comment.