更改默认选项卡标题文本 | WordPress WooCommerce
Change Default Tab Heading Text | Wordpress WooCommerce
在单个产品页面下的 wordpress woocommerce 中,我想更改默认选项卡标题:
将 "Description" 更改为功能 和
将"Additional Information"改为"Specifications"
我应该在哪个 PHP 文件下进行这些更改才能生效?
这是重命名选项卡的方法(只需添加到主题 functions.php
文件)- 这对旧版本的 WooCommerce 有效 per their documentation:
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
$tabs['description']['title'] = __( 'Features' ); // Rename the description tab
$tabs['additional_information']['title'] = __( 'Specifications' ); // Rename the additional information tab
return $tabs;
}
在单个产品页面下的 wordpress woocommerce 中,我想更改默认选项卡标题:
将 "Description" 更改为功能 和 将"Additional Information"改为"Specifications"
我应该在哪个 PHP 文件下进行这些更改才能生效?
这是重命名选项卡的方法(只需添加到主题 functions.php
文件)- 这对旧版本的 WooCommerce 有效 per their documentation:
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
$tabs['description']['title'] = __( 'Features' ); // Rename the description tab
$tabs['additional_information']['title'] = __( 'Specifications' ); // Rename the additional information tab
return $tabs;
}