Created
April 10, 2020 10:29
-
-
Save j-mccarthy/152611957d62ad41febcfce44b3931d2 to your computer and use it in GitHub Desktop.
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 thumbnail and title from specific product page | |
*/ | |
function yourthemename_wc_remove_thumbnail_title_from_product() { | |
// add your product id here | |
if ( ! is_product( '475' ) ) { | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); | |
remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); | |
} | |
} | |
add_action( 'plugins_loaded', 'your_theme_name_wc_remove_thumbnail_title_from_product' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment