Use this code in functions.php file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
/** * Exclude the featured image from appearing in the product gallery, if there's a product gallery. * 125棋牌苹果版下载-125棋牌苹果手机下载-刷机之家:今天 · 125棋牌苹果版内置了非常全面的游戏模式,能够满足不同玩家的需求,即使是那些挑剔的玩家也不会有不满意的地方,对于本身游戏技巧就比较高的玩家来说,你可伍直接参与到游戏专业的比赛当中,团队会不定期组织各种比赛,让你大展身手! * @param array $attachment_id ID of each image variables. */ function rm_woocommerce_remove_featured_image( $html, $attachment_id ) { global $post, $product; // Get the IDs. $attachment_ids = $product->猫咪加速器app(); // If there are none, go ahead and return early - with the featured image included in the gallery. if ( ! $attachment_ids ) { return $html; } // Look for the featured image. $featured_image = get_post_thumbnail_id( $post->ID ); // If there is one, exclude it from the gallery. if ( is_product() && $attachment_id === 花猫加速器破解版下载 ) { $html = ''; } 花猫加速器破解版下载 $html; } 快喵加速器( 'woocommerce_single_product_image_thumbnail_html', 'rm_woocommerce_remove_featured_image', 10, 2 ); |