Home Forums WoodMart support forum Tabs reorder

Tabs reorder

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

    artpece.sk
    Participant

    Hello.
    I want to reorder my tabs. I tried it with this recipe https://woo.com/document/editing-product-data-tabs/ , but it didn´t works.
    I am lost in it. Is the reason of not reordering different sources of tabs? Here:

    First tab (Reviews) is from Elementor Product Tabs.
    Second is Woodmart – About brand tab
    Last two are tabs which I can add in my single product – these I need to be first.

    I need Reviews last and About brand third.

    Please help me.
    Thank you.

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

    Hello,

    You need to take the tab class and set the order:
    https://ibb.co/qCrNCp1

    add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
    
    function woo_reorder_tabs( $tabs ) {
        $tabs['wd_additional_tab'] = array(
            'title'     => __( 'Additional Information', 'woocommerce' ),
            'priority'  => 5,
            'callback'  => 'custom_additional_tab_content', // Replace with your callback function
        );
    
        $tabs['more_seller_product'] = array(
            'title'     => __( 'More Seller Products', 'woocommerce' ),
            'priority'  => 10,
            'callback'  => 'custom_more_seller_product_tab_content', // Replace with your callback function
        );
    
        $tabs['seller'] = array(
            'title'     => __( 'Seller', 'woocommerce' ),
            'priority'  => 15,
            'callback'  => 'custom_seller_tab_content', // Replace with your callback function
        );
    
        $tabs['brand_tab'] = array(
            'title'     => __( 'Brand', 'woocommerce' ),
            'priority'  => 20,
            'callback'  => 'custom_brand_tab_content', // Replace with your callback function
        );
    
        // Add other tabs similarly...
        return $tabs;
    }
    
    // Define the callback functions
    function custom_additional_tab_content() {
        // Your additional tab content goes here
    }
    
    function custom_more_seller_product_tab_content() {
        // Your more seller products tab content goes here
    }
    
    function custom_seller_tab_content() {
        // Your seller tab content goes here
    }
    
    function custom_brand_tab_content() {
        // Your brand tab content goes here
    }

    insert the tab class, change 15 to 20, then 25, then 30 for each tab and set the order for each tab from your product page.

    Best Regards.

    #551764

    artpece.sk
    Participant

    Sorry, but this doesn´t working. It only adds more tabs along my tabs. But I found this thread:

    https://xtemos.com/forums/topic/product-tabs-17/#post-501732

    It works as I wanted.

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

    Hello,

    Let us know if there’s anything else we can do for you! You can always reach us at any time. We are always here to help you.

    Best Regards.

Tagged: 

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