Split: How to change the product tabs order
-
Hey, I have added a additional tab from the theme settings > single product > tabs.
the tab name is shipping & delivery.
i want to change the order of this to the last. there are 4 tabs currently.
let me how this can be done.
Hello,
The code below will help you to reorder the tabs. Define it in the functions.php file in your child theme.
/**
* Reorder product data tabs
*/
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
$tabs['reviews']['priority'] = 33; // Reviews first
$tabs['description']['priority'] = 4; // Description second
$tabs['additional_information']['priority'] = 5; // Additional information third
// Additional Tabs are from Theme Settings
$tabs['wd_additional_tab']['priority'] = 1;
$tabs['wd_additional_tab_2']['priority'] = 2;
return $tabs;
}
Kind Regards
thanks for this but i tried and its not working,
reviews tab i have adjusted but i’, not able top adjust the others.
‘shipping & delivery’ tab i added from the theme as that’s same for all.
‘gameplay’ and ‘shuffle review’ i have added on per product tabs setting.
so please help me with how i can make the shipping & delivery one at the last or maybe 3rd position.
Hello,
Shipping & Delivery 3rd:
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
$tabs['wd_additional_tab']['priority'] = 96;
return $tabs;
}
Paste it into the fucntions.php file in your child theme.
Kind Regards
thanks for this, it worked
Hello,
You are welcome! If you do not mind, can you please leave a 5 stars rating for our theme by going here: http://themeforest.net/downloads It will allow us to release more updates and provide dedicated support in the future. It would encourage our work a lot.
Have a good day!
Kind Regards
The topic ‘Split: How to change the product tabs order’ is closed to new replies.