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_filter( 'storefront_handheld_footer_bar_links', 'remove_mobile_links' ); | |
function remove_mobile_links( $links ) { | |
unset( $links['cart'] ); | |
return $links; | |
} |
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_filter( 'woocommerce_get_image_size_single', 'custom_wc_product_img_size' ); | |
add_filter( 'woocommerce_get_image_size_shop_single', 'custom_wc_product_img_size' ); | |
add_filter( 'woocommerce_get_image_size_woocommerce_single', 'custom_wc_product_img_size' ); | |
function custom_wc_product_img_size() { | |
$size = array( | |
'width' => 800, | |
'height' => 800, | |
'crop' => 1, | |
); |
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_theme_support( 'woocommerce', array( | |
'thumbnail_image_width' => 300, | |
'single_image_width' => 600, | |
) ); |
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
/** | |
* @desc Remove in all product type quanityt fields | |
*/ | |
function wc_remove_all_quantity_fields( $return, $product ) { | |
return true; | |
} | |
add_filter( 'woocommerce_is_sold_individually', 'wc_remove_all_quantity_fields', 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 sd_custom_hide_sales_flash() { | |
return false; | |
} | |
add_filter( 'woocommerce_sale_flash', 'sd_custom_hide_sales_flash' ); |
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 wc_custom_login_redirect() { | |
// This will redirect the customer the referring url on login to WooCommerce.. | |
$location = $_SERVER['HTTP_REFERER']; | |
wp_safe_redirect($location); | |
exit(); | |
} | |
add_filter('woocommerce_login_redirect', 'wc_custom_login_redirect'); |
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
// Insert text below the Featured Products title | |
function add_featured_text_example() { | |
// Echo HTML | |
echo "<p>These are definitely our best products to consider!</p>"; | |
} | |
add_action( 'storefront_homepage_after_featured_products_title' , 'add_featured_text_example' ); |
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 alter_sf_products_per_page() { | |
// Return the number of products per page ( default: 12 ). | |
return 8; | |
} | |
add_filter('storefront_products_per_page', 'alter_sf_products_per_page' ); |
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
<img src="%clipboard" /> |