This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////// | |
| // 404 redirect home | |
| function redirect_404() { | |
| if (is_404()) { | |
| // $mail_body = 'This page generated a 404 error: ' . $_SERVER['REQUEST_URI']; | |
| // $mail_body .= "\nReferrer : " . $_SERVER['HTTP_REFERER']; | |
| // wp_mail( '[email protected]', '404 page detected', $mail_body); | |
| wp_redirect( home_url() ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////// | |
| // REMOVE WP EMOJI | |
| 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' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Remove each style one by one | |
| add_filter( 'woocommerce_enqueue_styles', 'jk_dequeue_styles' ); | |
| function jk_dequeue_styles( $enqueue_styles ) { | |
| unset( $enqueue_styles['woocommerce-general'] ); // Remove the gloss | |
| unset( $enqueue_styles['woocommerce-layout'] ); // Remove the layout | |
| unset( $enqueue_styles['woocommerce-smallscreen'] ); // Remove the smallscreen optimisation | |
| return $enqueue_styles; | |
| } | |
| // Or just remove them all in one line |