This file contains 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_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); | |
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); |
This file contains 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
/* Optimize For Big Screen */ | |
#container .container-inner { | |
width:1200px; | |
} | |
body.stylelayout-full .margin{ | |
width:1200px; | |
} | |
body.stylelayout-boxed #container .container-inner { | |
width:1200px; | |
} |
This file contains 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
add_action( 'get_header', 'prima_custom_addtocart_position' ); | |
function prima_custom_addtocart_position() { | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30); | |
add_action( 'woocommerce_product_thumbnails', 'woocommerce_template_single_add_to_cart', 30); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40); | |
add_action( 'woocommerce_product_thumbnails', 'woocommerce_template_single_meta', 40); | |
remove_action( 'woocommerce_single_product_summary', 'prima_socialite_output', 50 ); | |
add_action( 'woocommerce_product_thumbnails', 'prima_socialite_output', 50); |
This file contains 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
<?php | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
This file contains 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
<?php | |
/* | |
Usage: | |
cache_fragment_output( 'unique-key', 3600, function () { | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
}); | |
*/ | |
function cache_fragment_output( $key, $ttl, $function ) { |
This file contains 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
/* PrimaShop (WC) - hide featured header on product search result page. */ | |
add_action('get_header', 'prima_custom_hide_featuredheader_productsearch'); | |
function prima_custom_hide_featuredheader_productsearch() { | |
if ( !is_shop() ) return; | |
if ( !is_search() ) return; | |
remove_action( 'prima_header', 'prima_header_featured_output', 30 ); | |
} |
This file contains 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
/* | |
* Supposition v0.3a - an optional enhancer for Superfish jQuery menu widget | |
* | |
* Copyright (c) 2013 Joel Birch - based on work by Jesse Klaasse - credit goes largely to him. | |
* Special thanks to Karl Swedberg for valuable input. | |
* | |
* Dual licensed under the MIT and GPL licenses: | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html | |
*/ |
This file contains 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
/* add top margin to align mega menu with logo */ | |
#header-menu .megaMenuContainer { | |
margin-top: 40px; | |
} | |
/* reset top margin on smaller devices */ | |
@media only screen and (max-width: 1000px) { | |
#header-menu .megaMenuContainer { | |
margin-top: 0; | |
} | |
} |
This file contains 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
/* Wrap product image with a box container. */ | |
add_action('prima_custom_scripts', 'prima_custom_product_image_box'); | |
function prima_custom_product_image_box() { | |
echo 'jQuery(document).ready(function($) {'; | |
echo '$(".woocommerce ul.products li.product a img, .woocommerce-page ul.products li.product a img").wrap("<div class=\'product-image-box\'></div>");'; | |
echo '$(".woocommerce ul.products li.product .onsale, .woocommerce-page ul.products li.product .onsale").each(function() { var item = $(this); item.prependTo(item.parent().find(".product-image-box")); });'; | |
echo '});'; | |
echo "\n"; | |
} |
This file contains 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
/** | |
* single product page layout * | |
* 23% (image) + 4% (spacing) + 73% (summary) = 100% * | |
**/ | |
/* modify product image width */ | |
.woocommerce div.product div.images, .woocommerce #content div.product div.images, .woocommerce-page div.product div.images, .woocommerce-page #content div.product div.images { | |
width: 23%; | |
} | |
/* modify product summary width */ | |
.woocommerce div.product div.summary, .woocommerce #content div.product div.summary, .woocommerce-page div.product div.summary, .woocommerce-page #content div.product div.summary { |