Removing woocommerce short description field

前端 未结 3 1172
闹比i
闹比i 2021-01-07 01:03

I\'m creating a theme designed specifically for usage with woocommerce. This theme\'s design does not utilize the \"Product Short Description\". Removing that description fr

相关标签:
3条回答
  • 2021-01-07 01:44

    You can remove the Short Description field from the WooCommerce admin area via PHP:

    function remove_short_description() {
         remove_meta_box( 'postexcerpt', 'product', 'normal');
    }
    
    add_action('add_meta_boxes', 'remove_short_description', 999);
    
    0 讨论(0)
  • 2021-01-07 01:53

    This is also what I am looking for. For me, to target the product description's css, use .single-product .entry-content.

    Until now, I think Woocommerce doesn't provide any hook for product description only.

    0 讨论(0)
  • 2021-01-07 01:58

    As answered in different treads:

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
    
    function woocommerce_template_single_excerpt() {
        return;
    }
    
    0 讨论(0)
提交回复
热议问题