Home Forums WoodMart support forum Split: How to change the product tabs order

Split: How to change the product tabs order

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #556657

    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.

    #556712

    Luke Nielsen
    Keymaster

    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

    #556928

    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.

    #557206

    Luke Nielsen
    Keymaster

    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

    #557448

    thanks for this, it worked

    #557614

    Luke Nielsen
    Keymaster

    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

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Split: How to change the product tabs order’ is closed to new replies.