Nedenfor kan du finde et udvalg af funktioner, der kan inkluderes i alle projekter, som straks vil forbedre performance og pagespeed på dit website, uden at påvirke brugervenlighed og stabilitet. Alt skal inkluderes i din functions.php fil
remove_action('wp_head', 'print_emoji_detection_script', 7); remove_action('wp_print_styles', 'print_emoji_styles'); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'admin_print_styles', 'print_emoji_styles' ); remove_action( 'wp_head', 'feed_links_extra', 3 ); // Removes extra feed links remove_action( 'wp_head', 'feed_links', 2 ); // Removes default feed links remove_action( 'wp_head', 'rsd_link' ); // Removes RDS links remove_action( 'wp_head', 'wlwmanifest_link' ); // Removes default manifest remove_action( 'wp_head', 'wp_generator' ); // Removes generator and version // Removes ID from stylesheets making caching possible function hey_remove_style_id($link) { return preg_replace('/ id=["|\']{1}.*-css["|\']{1} /', '', $link); } add_filter('style_loader_tag', 'hey_remove_style_id',9999);
Skriv et svar