初期のhead内の記述を削除する

初期のhead内の記述を削除する

wordpressで制作する際に、どうしても初期のhead内の記述が嫌で仕方ありませんでした。
head内の記述を削除するために、以下の記述をfunctions.phpに追加します。

コードをクリップボードにコピー
remove_action("wp_head", "wp_resource_hints", 2);
remove_action("wp_head", "feed_links_extra", 3);
remove_action("wp_head", "print_emoji_detection_script", 7);
remove_action("wp_print_styles", "print_emoji_styles");
remove_action("template_redirect", "_wp_admin_bar_init", 0);
remove_action("wp_head","rest_output_link_wp_head");
remove_action("wp_head", "rsd_link");
remove_action("wp_head", "wlwmanifest_link");
remove_action("wp_head", "adjacent_posts_rel_link_wp_head");
remove_action("wp_head", "wp_generator");
remove_action("wp_head", "rel_canonical");
remove_action("wp_head", "wp_shortlink_wp_head", 10, 0);
remove_action("wp_head", "wp_oembed_add_discovery_links");
remove_action('wp_head','wp_oembed_add_host_js');

arrow_circle_up