Created
December 30, 2014 09:57
-
-
Save lmartins/0760a0545225eb3fda5b to your computer and use it in GitHub Desktop.
Replace WooCommerce default thumbnail placeholder
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
/* | |
* goes in theme functions.php or a custom plugin. Replace the image filename/path with your own :) | |
*/ | |
add_action( 'init', 'custom_fix_thumbnail' ); | |
function custom_fix_thumbnail() { | |
add_filter('woocommerce_placeholder_img', 'custom_woocommerce_placeholder_img'); | |
function custom_woocommerce_placeholder_img( $src ) { | |
$src = '<span class="thumb-placeholder"><i class="icon-camera"></i></span>'; | |
return $src; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment