Kode remove_action di Functions WordPress

Secara default blog WordPress menampilkan beberapa fungsi di theme Wordpress seperti menampilkan rss feed, wp generator, rel canonical atau yang lainnya.

Remove Action

Secara default blog WordPress menampilkan beberapa fungsi di theme WordPress seperti menampilkan rss feed, wp generator, rel canonical atau yang lainnya. Cara menghilangkan fungsi-fungsi tersebut, terapkan kode-kode berikut di functions.php theme WP Anda:

remove_action( 'wp_head', 'feed_links_extra', 3 ); //menghilangkan feed
remove_action( 'wp_head', 'feed_links', 2 ); //menghilangkan feed
remove_action( 'wp_head', 'rsd_link' ); //menghilangkan feed
remove_action( 'wp_head', 'wlwmanifest_link' ); //menghilangkan wlwmanifest link
remove_action( 'wp_head', 'index_rel_link' );  //menghilangkan link rel index
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); //menghilangkan parent post rel link
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 );  //menghilangkan start post rel link
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); //menghilangkan adjacent posts rel link
remove_action( 'wp_head', 'wp_generator' ); //menghilangkan generator wp
remove_action( 'do_feed_rdf', 'do_feed_rdf', 10, 1 ); //menghilangkan feed rdf
remove_action( 'do_feed_rss', 'do_feed_rss', 10, 1 ); //menghilangkan feed rss
remove_action( 'do_feed_rss2', 'do_feed_rss2', 10, 1 ); //menghilangkan feed rss2
remove_action( 'do_feed_atom', 'do_feed_atom', 10, 1 ); //menghilangkan feed atom
remove_action( 'wp_head', 'rel_canonical' ); //menghilangkan rel canonical

Author: Jevuska

Rachmanuddin Chair Yahya a.k.a Jevuska is the founder of Jevuska.Com, a qualified web about offering medical articles, blogging, tips, and tutorial of WordPress. Having written for Jevuska since 2007.

3 thoughts on “Kode remove_action di Functions WordPress”

Leave a Reply

Your email address will not be published. Required fields are marked *

Use tag [php] to add code, e.g. [php]<?php echo $var; ?>[/php]