Sorting tabs on the product page
-
Hi! I need your help.
1. I need to place CUSTOM TABS before ADDITIONAL TABS https://take.ms/9MCmY .
2. 2. And then all these tabs I need to align to the left edge of https://take.ms/ikZqa , not centered as it is now.
Can you please tell me how to do it?
Attachments:
You must be
logged in to view attached files.
Hello,
01. You can try to reorder them according to WooCommerce instructions https://woo.com/document/editing-product-data-tabs/
02. Please try using the below Custom CSS code and paste it to Dashboard >> Theme Settings >> Custom CSS >> Global CSS section:
.product-tabs-wrapper .tabs-layout-tabs>.wd-nav-tabs-wrapper {
text-align: left;
}
Best Regards.
1. Unfortunately, it didn’t work https://take.ms/MV3KA -> https://take.ms/tQcCC . Perhaps for WoodMart template is not suitable for the standard recommendation described in the instructions https://woo.com/document/editing-product-data-tabs/ and is there another way to solve this problem?
2. Here it works correctly, thank you!
Hello,
Use the below code for reordering the tabs, just set priority values per your needs. Paste the code into 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;
}
Best Regards.