- Seconds Out [Genesis] - Puntata del 28/11/2013
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* Woocommerce - Lista Categorie */ | |
function woocommerce_subcats_from_parentcat_by_name($parent_cat_NAME) { | |
$IDbyNAME = get_term_by('slug', $parent_cat_NAME, 'product_cat'); | |
$product_cat_ID = $IDbyNAME->term_id; | |
$args = array( | |
'hierarchical' => 1, | |
'show_option_none' => '', | |
'hide_empty' => 0, | |
'parent' => $product_cat_ID, |
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
/* Woocommerce - Lista Prodotti Featured */ | |
function list_featured() { | |
$args = array( | |
'post_type' => 'product', | |
'meta_key' => '_featured', | |
'meta_value' => 'yes', | |
'posts_per_page' => 4 | |
); | |
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
/** | |
* Hide ALL shipping options when free shipping is available and customer is NOT in certain states | |
* Hide Free Shipping if customer IS in those states | |
* | |
* UPDATED FOR WOOCOMMERCE 2.1 | |
* | |
* Change $excluded_states = array( 'AK','HI','GU','PR' ); to include all the states that DO NOT have free shipping | |
*/ | |
add_filter( 'woocommerce_package_rates', 'hide_all_shipping_when_free_is_available' , 10, 2 ); | |
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
function my_woocommerce_return_to_shop_redirect( $return_to ) { | |
return 'LINK_TUO_URL'; | |
} | |
add_filter( 'woocommerce_return_to_shop_redirect', 'my_woocommerce_return_to_shop_redirect', 20 ); |
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
<div class="woo-sc-box normal large"></div> |
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
function themename_setup() { | |
load_theme_textdomain('woothemes', get_stylesheet_directory().'/lang'); | |
} | |
themename_setup(); |
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
.threecol-one { | |
background: none repeat scroll 0 0 #EAEAEA; | |
border-radius: 10px; | |
min-height: auto; | |
padding: 2%; | |
width: 28%; | |
margin-right: 1%; | |
text-align: center; | |
font-weight: bold; | |
} |
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
if ( function_exists('register_sidebar') ) { | |
register_sidebar(array( | |
'name' => 'Nome Per Esteso Widget', | |
'id' => "nome-widget", | |
'before_widget' => '', | |
'after_widget' => '', | |
'before_title' => '', | |
'after_title' => '' ) ); | |
} |
OlderNewer