Home Forums WoodMart support forum Move additional tabs

Move additional tabs

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

    Vasyl Savchyn
    Participant

    How to move additional tabs to the beginning?

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

    Luke Nielsen
    Keymaster

    Hello,

    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

    #606127

    Vasyl Savchyn
    Participant

    Moved Reviews to the front. However, I need it to move the “Round Mirror Shape” forward.

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

    Vasyl Savchyn
    Participant

    I note that it will be called differently for each product.

    #606130

    Luke Nielsen
    Keymaster

    The above code is related to all tabs, so If you need to move forward only the 1 custom tab, then just define only 1 line of code that is related to that tab, e.g. https://take.ms/CTiN7

    First clarify where you have defined that custom tab, if it was in Theme Settings then use this part of code – https://take.ms/ZpHH9

    Kind Regards

    • This reply was modified 2 weeks, 3 days ago by Luke Nielsen.

Tagged: 

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