Skip to content

Instantly share code, notes, and snippets.

View thesaurabhk's full-sized avatar

Saurabh K thesaurabhk

View GitHub Profile
<?php
//* You don't need to add the opening php tag shown above.
//* Only copy and paste the below given code in functions.php file.
//* TN Dequeue Styles - Remove Dashicons from Genesis Theme
add_action( 'wp_print_styles', 'tn_dequeue_dashicons_style' );
function tn_dequeue_dashicons_style() {
wp_dequeue_style( 'dashicons' );
<?php
//* You don't need to add the opening php tag shown above.
//* Only copy and paste the below given code in functions.php file.
//* TN Dequeue Styles - Remove Font Awesome from WordPress theme
add_action( 'wp_print_styles', 'tn_dequeue_font_awesome_style' );
function tn_dequeue_font_awesome_style() {
wp_dequeue_style( 'fontawesome' );
wp_deregister_style( 'fontawesome' );
<?php
//* You don't need to add the opening php tag shown above.
//* Only copy and paste the below given code in functions.php file.
//* TN Dequeue Styles - Remove Google Fonts form Genesis Sample WordPress Theme
add_action( 'wp_print_styles', 'tn_dequeue_google_fonts_style' );
function tn_dequeue_google_fonts_style() {
wp_dequeue_style( 'genesis-sample-fonts' );
wp_deregister_style( 'genesis-sample-fonts' );
<?php
//* You don't need to add the opening php tag shown above.
//* Only copy and paste the below given code in functions.php file.
//* TN Dequeue Styles - Remove Google Fonts form Divi Theme
add_action( 'wp_print_styles', 'tn_dequeue_divi_fonts_style' );
function tn_dequeue_divi_fonts_style() {
wp_dequeue_style( ‘divi-fonts' );
wp_deregister_style( ‘divi-fonts' );
#
# Paste the following code into your .Htaccess file
#
# TN START GZIP COMPRESSION
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
#
# Paste the following code in the configuration file of your web Nginx server
#
gzip on;
gzip_comp_level 2;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16 8k;
#
# Paste the following code into your .Htaccess file
#
# TN START ENABLE KEEP ALIVE
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
# TN END ENABLE KEEP ALIVE
#
# Paste the following code into your .Htaccess file
#
# TN - START EXPIRES CACHING #
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
#
# Paste the following code into your .Htaccess file
#
# TN - BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
#
# Paste the following code into your .Htaccess file
#
# TN – ENABLE MOD PAGESPEED START
# COMBINE CSS, COMPRESS IMAGES, REMOVE HTML WHITE SPACE AND COMMENTS
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedEnableFilters rewrite_css,combine_css