开发者 |
wpbranch
ikamal |
---|---|
更新时间 | 2022年10月20日 11:40 |
PHP版本: | 4.7 及以上 |
WordPress版本: | 6.0 |
Requires WooCommerce 3.9.4 or newerFeatures
This free version does not have that functionality, but you can with the premium WooTabs Pro. This allows you to add multiple tabs, share tabs, edit core tabs, or re-order tab display.
The tab heading is shown before the tab content and is the same string as the tab title. An easy way to hide this is to add the following to the bottom of your theme's functions.php or wherever you keep custom code:
add_filter( 'wootabs_lite_heading', '__return_empty_string' );
Be sure that (1) your HTML is valid -- try putting your tab content into a blog post draft and see how it renders. (2) Be sure any shortcodes will expand in your blog post draft as well; if they don't work properly there, they won't work in your custom tab.
Yep, there's the wootabs_lite_title
that passes in the tab title for you to change. This filter also passes in the $product
and class instance if you'd like to change this conditionally.
Here's how you can set one title for all custom tabs, regardless of what title is entered on the product page (can go in the bottom of functions.php or where you keep custom code):
function sv_change_custom_tab_title( $title ) { $title = 'Global tab title'; return $title; } add_filter( 'wootabs_lite_title', 'sv_change_custom_tab_title' );