Home › Forums › WoodMart support forum › Reorder product tabs
Reorder product tabs
- This topic has 4 replies, 2 voices, and was last updated 3 years, 11 months ago by Elise Noromit.
-
AuthorPosts
-
December 17, 2020 at 11:13 am #251743
owldigitalsParticipantHi,
I have problem with the tab not active, it needs clicking to show contents
I reordered tabs to have BRAND TAB – 1 and is this code fine?
// Reorder Tabs on WooCommerce Product Page ----------------------------------- function bashi_reorder_tabs_product_page( $tabs ) { $tabs['description']['priority'] = 5; $tabs['brand_tab']['priority'] = 10; $tabs['reviews']['priority'] = 15; $tabs['woodmart_additional_tab']['priority'] = 20; return $tabs; } add_filter( 'woocommerce_product_tabs', 'bashi_reorder_tabs_product_page', 98 );
Here’s screenshot, ordering is fine, just the first BRANDS tab is not active/opened and I need to make it open when entering the page
December 17, 2020 at 11:23 am #251745
owldigitalsParticipantFound the problem, when I move DESCRIPTION TAB priority after brand_tab, it works,
// Reorder Tabs on WooCommerce Product Page ----------------------------------- function bashi_reorder_tabs_product_page( $tabs ) { $tabs['description']['priority'] = 30; $tabs['brand_tab']['priority'] = 10; $tabs['reviews']['priority'] = 15; $tabs['woodmart_additional_tab']['priority'] = 20; return $tabs; } add_filter( 'woocommerce_product_tabs', 'bashi_reorder_tabs_product_page', 98 );
but in theory, I want to keep description tab 1-st when it will have content to show and when not, not to show and 2nd BRAND tab to be opened automatically
December 17, 2020 at 9:55 pm #251903
Elise NoromitMemberHello,
We are glad you have solved the issue. If you have any questions please feel free to contact us.
Best Regards
December 18, 2020 at 11:15 pm #252246
owldigitalsParticipantNo, you got it wrong my problem is not solved,
I need to have Description tab #1 and hidden when no content.
Brands tab should be #2 and automatically showing content
Now description tab is #4 and thats why Brands tab is working fine (showing content)
December 19, 2020 at 12:44 pm #252352
Elise NoromitMemberHello,
If you remove all the content from the main product description, there would be no Description tab.
Woocommerce does not provide the option to change the order of the tabs and our theme does not have this option either.
You will have to customize Woocommerce or find a plugin.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register