Skip to content

Instantly share code, notes, and snippets.

@aprakasa
Last active December 14, 2015 11:58
Show Gist options
  • Save aprakasa/5082956 to your computer and use it in GitHub Desktop.
Save aprakasa/5082956 to your computer and use it in GitHub Desktop.
Remove price display at homepage
add_action( 'get_header', 'remove_price_at_homepage' );
/**
* Remove price display and add to chart button at homepage
*
* @see http://docs.woothemes.com/document/hooks/
*/
function remove_price_at_homepage() {
if ( is_home() || is_front_page() ) {
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment