Skip to content

Instantly share code, notes, and snippets.

Tuan Phan tuanbbhero

View GitHub Profile
View Fix Leverage Browser Caching
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
Header set Cache-Control "max-age=84600, public"
</filesMatch>
## EXPIRES HEADER CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
View Remove Query Strings
function remove_query_strings() {
if(!is_admin()) {
add_filter('script_loader_src', 'remove_query_strings_split', 15);
add_filter('style_loader_src', 'remove_query_strings_split', 15);
}
}
function remove_query_strings_split($src){
$output = preg_split("/(&ver|\?ver)/", $src);
return $output[0];
View Leverage Browser Caching
// Cache-Control
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$">
Header set Cache-Control "max-age=84600, public"
</filesMatch>
// Expires Header
## EXPIRES HEADER CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
@tuanbbhero
tuanbbhero / Full-height fixed row on Right - Beaver Builder
Last active Apr 12, 2019
Full-height sticky row on right and left, created by BeaverHero.com
View Full-height fixed row on Right - Beaver Builder
/* If you want to sticky on RIGHT, use this css */
@media screen and (min-width:991px) {
.kl-fixed-sidebar {
position: fixed;
top:0;
bottom:0;
right:0;
height:100%;
z-index:9000;
width: 250px;
View Change Copyright Text - GP Premium
View WooCommerce Remove Long Description
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
View Remove Pricing Woo Shop
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
View Remove Pricing Woo Product
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
View Remove Star Rating WooCommerce
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
View Remove Add to Cart Button Shop Page
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
You can’t perform that action at this time.