<?php wp_head(); ?>
をテンプレートのheader.phpの<head>内に入れないとプラグインのCSSやJSが読み込まれなかったりする
でも入れるといろんなmetaタグが挿入される(RSSとかWPのバージョン情報とか
不要なものは消す
// WPバージョン表示削除
remove_action('wp_head','wlwmanifest_link');
remove_action('wp_head','feed_links', 2 );
remove_action('wp_head','feed_links_extra', 3 );
remove_action('wp_head','rsd_link');
remove_action('wp_head','wp_generator');
remove_action('wp_head','adjacent_posts_rel_link_wp_head');
remove_action('wp_head','wp_shortlink_wp_head');
remove_action('wp_head','rel_canonical');
remove_action('wp_head','rest_output_link_wp_head');
remove_action('wp_head','wp_oembed_add_discovery_links');
remove_action('wp_head','wp_oembed_add_host_js');
remove_action('template_redirect', 'rest_output_link_header', 11 );
Wordpress4.2くらいから絵文字が使えるようになったけど案件では使わないので
挿入されるJSやCSSを消す
function disable_emoji() {
remove_action('wp_head','print_emoji_detection_script',7);
remove_action('admin_print_scripts','print_emoji_detection_script');
remove_action('wp_print_styles','print_emoji_styles');
remove_action('admin_print_styles','print_emoji_styles');
remove_filter('the_content_feed','wp_staticize_emoji');
remove_filter('comment_text_rss','wp_staticize_emoji');
remove_filter('wp_mail','wp_staticize_emoji_for_email');
}
add_action('init','disable_emoji');