Posted By

scottnix on 10/04/11


Tagged

php wordpress head thematic


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

DaR3Y


Cleaner WP head


 / Published in: PHP
 

URL: http://scottnix.com/2011/polishing-thematics-head/

Clean up unnecessary code from the document head of WordPress, especially the WordPress version wp_generator.

  1. // clean up useless wordpress links in the head of the document
  2.  
  3. // remove wp version number
  4. remove_action('wp_head', 'wp_generator');
  5. // remove really simple discovery
  6. remove_action('wp_head', 'rsd_link');
  7. // remove windows live writer xml
  8. remove_action('wp_head', 'wlwmanifest_link');
  9. // remove index relational link
  10. remove_action('wp_head', 'index_rel_link');
  11. // remove parent relational link
  12. remove_action('wp_head', 'parent_post_rel_link');
  13. // remove relational start link
  14. remove_action('wp_head', 'start_post_rel_link');
  15. // remove prev/next relational link
  16. remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');

Report this snippet  

You need to login to post a comment.