Home Forums WoodMart support forum Reorder product tabs (custom & global)

Reorder product tabs (custom & global)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #573018

    designmono
    Participant

    Hi,

    On a product page custom product tabs are shown under the global tabs (additional tabs created in theme settings). We would like to show the custom tabs first (created in product page settings). Could you please explain how to reorder them?

    #573271

    Hung Pham
    Keymaster

    Hello designmono,

    First of all, I’m really sorry have taken long time to reply you due to the weekend.

    The code below will help you to reorder the tabs. Please try to add the code below 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,

Tagged: 

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