BLOG TAAUM

Broadcast television ,PHP ,GIS ,POSTGIS ,POSTGRESQL ,MAPSERVER ,MAP ,MySQL

programming

ลบ header ที่ไม่จำเป็นของ wordpress

บางครั้ง wordpress จะเกิด คิวรี่ ที่ผมเองก็ไม่รู้ว่า ใช้ทำอะไรเหมือนกัน มีพี่ที่ mthai แนะนำให้ remove header บางตัวออก
ผมลองค้าหาจาก กูเกิล ก็คือให้ใส่ code นี้ในไฟล์ฟังก์ชั่นของธีมที่ใช้ดังนี้ครับ

remove_action( 'wp_head', 'feed_links_extra', 3 ); // Removes the links to the extra feeds such as category feeds
remove_action( 'wp_head', 'feed_links', 2 ); // Removes links to the general feeds: Post and Comment Feed
remove_action( 'wp_head', 'rsd_link'); // Removes the link to the Really Simple Discovery service endpoint, EditURI link
remove_action( 'wp_head', 'wlwmanifest_link'); // Removes the link to the Windows Live Writer manifest file.
remove_action( 'wp_head', 'index_rel_link'); // Removes the index link
remove_action( 'wp_head', 'parent_post_rel_link'); // Removes the prev link
remove_action( 'wp_head', 'start_post_rel_link'); // Removes the start link
remove_action( 'wp_head', 'adjacent_posts_rel_link'); // Removes the relational links for the posts adjacent to the current post.
remove_action( 'wp_head', 'wp_generator'); // Removes the WordPress version i.e. - WordPress 2.8.4

ที่มา http://rjpargeter.com/2009/09/removing-wordpress-wp_head-elements/

Tagged:

Related Posts