Home Forums WoodMart support forum Re-arrange the single product tab order.

Re-arrange the single product tab order.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #638481

    iamkane1
    Participant

    I always do a google search for my query and add ‘woodmart’ on the end, and it always brings something up.
    I have just done this now and you replied to someone in 2022 to say that Woodmart does not have the functionality to rearrange the tabs….. and you posted this link..
    https://woocommerce.com/document/editing-product-data-tabs/

    I don’t want to start messing around with PHP/CSS just yet…
    Is there any way to arrange the tabs?
    I would like ‘HEALTH TALK to be number 2….

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

    Hung Pham
    Keymaster

    Hello iamkane1,

    Thanks for reaching to us.

    Try to use the code below instead of yours. Define the code 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'] = 5;			// Reviews first
    	$tabs['description']['priority'] = 10;			// Description second
    	$tabs['additional_information']['priority'] = 15;	// Additional information third
    
    	// Custom Tabs are from Product Settings
    	// $tabs['wd_custom_tab']['priority'] = 2; 
    	// $tabs['wd_custom_tab_2']['priority'] = 3;
    
    	// Additional Tabs are from Theme Settings
    	// $tabs['wd_additional_tab']['priority'] = 4;
    	// $tabs['wd_additional_tab_2']['priority'] = 5;
    
    	return $tabs;
    }

    Kind Regards

    #638656

    iamkane1
    Participant

    Hi thanks.. Looks complex..
    How do I change the actual order though?
    Does PHP like this add complications to website speed?

    $tabs[‘reviews’][‘priority’] = 5; // Reviews first
    $tabs[‘description’][‘priority’] = 10; // Description second
    $tabs[‘additional_information’][‘priority’] = 15; // Additional information third

    This bit? Just chnage my tab names here????

    #638692

    iamkane1
    Participant

    Hi see link in hidden, I have added a new tab within single product edit page, but now the address name had this weird /#tab-wd_custom_tab at the end??? I can delete this?

    #638961

    Hung Pham
    Keymaster

    Hi iamkane1,

    To assist you in the best possible manner, I kindly ask that you please provide me temporary wp-admin info (wp-admin URL, username, password) to the Private Content area, this will allow me to thoroughly investigate and address your concerns more efficiently.

    Kind Regards,

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