如何在wordpress的单个产品页面中删除wordpress的简短描述选项卡? [英] How to remove wordpress Short description tab in single product page in wordpress?

查看:39
本文介绍了如何在wordpress的单个产品页面中删除wordpress的简短描述选项卡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在wordpress中删除单个产品页面中的简短描述选项卡?

How to remove Short description tab in single product page in word press?

我有 3 个标签,例如

I have 3 tabs like

1.产品描述
2.简短说明
3.评论

1.product description
2.Short description
3.Reviews

如果是空的,我想删除简短的描述标签.

I want to remove short description tab if that is empty.

推荐答案

简短描述选项卡称为 product_summary;在您的 functions.php

The short description tab is called product_summary; use the snippet below in your functions.php

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );

function woocommerce_template_single_excerpt() {
        return;
}

请注意,并非所有主题都在选项卡中呈现 product_summary,对于某些主题,应相应调整代码段.

Please note that not all the themes are rendering product_summary in a tab, for some themes the snippet should be tweaked accordingly.

这篇关于如何在wordpress的单个产品页面中删除wordpress的简短描述选项卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆