Home Forums WoodMart support forum Change order of tabs on product page

Change order of tabs on product page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #112820

    radekcho
    Participant

    Hi,

    Can I change the order of the tabs on the product page, in order:

    1. Desciptrion tab
    2. Woodmart custom tab
    3. Additional tab

    I tried add the code in the functions.php but, but it does not work

    add_filter( ‘woocommerce_product_tabs’, ‘reordered_tabs’, 98 );
    function reordered_tabs( $tabs ) {
    $tabs[‘description’][‘priority’] = 5;
    $tabs[‘woodmart_custom_tab_tab’][‘priority’] = 10;
    $tabs[‘woodmart_additional_tab_tab’][‘priority’] = 15;

    return $tabs;

    #112838

    radekcho
    Participant

    Too much tab 😉 It’s working now. The correct code is:

    /**
    * Reorder product data tabs
    */
    add_filter( ‘woocommerce_product_tabs’, ‘woo_reorder_tabs’, 98 );
    function woo_reorder_tabs( $tabs ) {

    $tabs[‘description’][‘priority’] = 5; // Description first
    $tabs[‘woodmart_custom_tab’][‘priority’] = 10; // WooDmart Custom second
    $tabs[‘woodmart_additional_tab’][‘priority’] = 15; // WoodMart Additional information third

    return $tabs;
    }

    #112876

    Hello,

    Thank you very much for choosing our theme and for contacting us.

    Customization of Woocommerce tabs is not covered by our support. If you have any questions related to our theme please feel free to contact us.

    Best Regards

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