WordPress Page Speed Improvements

// Remove Emojis
// Emojis are enabled by default, so if you don't want to use these you can remove the script and stylesheet:
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
// Remove comment-reply.min.js
// This is added by default to the footer, if you're not using post comments or DISQUS you can remove the script:
function remove_comment_reply_script(){
wp_deregister_script( 'comment-reply' );
// Remove WP embed script
// Removal of URL embedding for tweets, YouTube videos etc on the front-end
function speed_stop_loading_wp_embed() {
if (!is_admin()) {
add_action('init', 'speed_stop_loading_wp_embed');
//* Remove query strings from static resources
function _remove_script_version( $src ){
$parts = explode( '?ver', $src );
return $parts[0];
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
view raw functions.php hosted with ❤ by GitHub