Home Forums WoodMart support forum Changing the Order of Tabs on the Product Page

Changing the Order of Tabs on the Product Page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #600979

    Ecommerce
    Participant

    Hi,

    How can I change the order of the tabs on the product page?

    – Additional Advice: Can you add this feature to the theme feature with drag-and-drop logic without interfering with the theme source codes? This issue is a common problem for many people.

    Attachments:
    You must be logged in to view attached files.
    #601024

    Hello,

    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;
    }

    Please follow this guide:
    https://woocommerce.com/document/editing-product-data-tabs/

    Best Regards

    #601035

    Ecommerce
    Participant

    How can I find out the ID information of the tabs on the product page as in the example below?

    For example:
    [‘additional_information’]
    [‘description’]

    #601194

    Hello,

    Use Developer Tools by pressing F12 to find the tab class and tab ID. For better understanding, refer to this screenshot: https://ibb.co/qCrNCp1.

    Best Regards

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