Home › Forums › WoodMart support forum › Tabs reorder › Reply To: Tabs reorder
March 23, 2024 at 1:38 pm
#551669
Aizaz Imtiaz Awan
Keymaster
Hello,
You need to take the tab class and set the order:
https://ibb.co/qCrNCp1
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
$tabs['wd_additional_tab'] = array(
'title' => __( 'Additional Information', 'woocommerce' ),
'priority' => 5,
'callback' => 'custom_additional_tab_content', // Replace with your callback function
);
$tabs['more_seller_product'] = array(
'title' => __( 'More Seller Products', 'woocommerce' ),
'priority' => 10,
'callback' => 'custom_more_seller_product_tab_content', // Replace with your callback function
);
$tabs['seller'] = array(
'title' => __( 'Seller', 'woocommerce' ),
'priority' => 15,
'callback' => 'custom_seller_tab_content', // Replace with your callback function
);
$tabs['brand_tab'] = array(
'title' => __( 'Brand', 'woocommerce' ),
'priority' => 20,
'callback' => 'custom_brand_tab_content', // Replace with your callback function
);
// Add other tabs similarly...
return $tabs;
}
// Define the callback functions
function custom_additional_tab_content() {
// Your additional tab content goes here
}
function custom_more_seller_product_tab_content() {
// Your more seller products tab content goes here
}
function custom_seller_tab_content() {
// Your seller tab content goes here
}
function custom_brand_tab_content() {
// Your brand tab content goes here
}
insert the tab class, change 15 to 20, then 25, then 30 for each tab and set the order for each tab from your product page.
Best Regards.