Home Forums WoodMart support forum Reorder product tabs

Reorder product tabs

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

    owldigitals
    Participant

    Hi,

    I have problem with the tab not active, it needs clicking to show contents

    I reordered tabs to have BRAND TAB – 1 and is this code fine?

    // Reorder Tabs on WooCommerce Product Page -----------------------------------
    function bashi_reorder_tabs_product_page( $tabs ) {
    	$tabs['description']['priority'] = 5;
        $tabs['brand_tab']['priority'] = 10;
        $tabs['reviews']['priority'] = 15;
        $tabs['woodmart_additional_tab']['priority'] = 20;
        return $tabs;
    }
    add_filter( 'woocommerce_product_tabs', 'bashi_reorder_tabs_product_page', 98 );

    Here’s screenshot, ordering is fine, just the first BRANDS tab is not active/opened and I need to make it open when entering the page

    https://imgur.com/a/NDmX2iy

    #251745

    owldigitals
    Participant

    Found the problem, when I move DESCRIPTION TAB priority after brand_tab, it works,

    // Reorder Tabs on WooCommerce Product Page -----------------------------------
    function bashi_reorder_tabs_product_page( $tabs ) {
    	$tabs['description']['priority'] = 30;
        $tabs['brand_tab']['priority'] = 10;
        $tabs['reviews']['priority'] = 15;
        $tabs['woodmart_additional_tab']['priority'] = 20;
        return $tabs;
    }
    add_filter( 'woocommerce_product_tabs', 'bashi_reorder_tabs_product_page', 98 );

    but in theory, I want to keep description tab 1-st when it will have content to show and when not, not to show and 2nd BRAND tab to be opened automatically

    #251903

    Hello,

    We are glad you have solved the issue. If you have any questions please feel free to contact us.

    Best Regards

    #252246

    owldigitals
    Participant

    No, you got it wrong my problem is not solved,

    I need to have Description tab #1 and hidden when no content.

    Brands tab should be #2 and automatically showing content

    Now description tab is #4 and thats why Brands tab is working fine (showing content)

    #252352

    Hello,

    If you remove all the content from the main product description, there would be no Description tab.

    Woocommerce does not provide the option to change the order of the tabs and our theme does not have this option either.

    You will have to customize Woocommerce or find a plugin.

    Best Regards

Tagged: ,

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