Home Forums WoodMart support forum product page custom tab orders

product page custom tab orders

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #349532

    auroramarinecode
    Participant

    I am creating a custom tab from your theme and using html block in it. on the product it shows at last i want that in second number. Can you guide me how can i do it? Please see the image for better understanding.
    capture.jpg = I am creating tab from here
    capture1.jpg = on the page it is showing in the last. I want to it number 2.

    If this is woocommerce tab then please still help me send me some tutorial or links. thanks

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

    Hello,

    WoodMart does not have the option to change the order of the tabs. Please check this Woocommerce manual: https://woocommerce.com/document/editing-product-data-tabs/

    Best Regards

    #349582

    auroramarinecode
    Participant

    I have already read about that and woocommerce has only 3 tabs. Description and reviews i am using in your theme and additional information i hid it. The tab i am talking about it is in your theme. You can see on single product page it has name custom tab, custom title name etc. Can you tell me how can i set it in second place? If you cant solve this problem then at least tell me what is method name so i can put some coding in function.php

    #349668

    Hello,

    The Woocommerce gives this code:

    /**
     * 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
    
    	return $tabs;
    }

    You need to take the tab class and set the order: https://gyazo.com/d9e2224a5947d1baa627a2cb79dc4edb

    /**
     * Reorder product data tabs
     */
    add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
    function woo_reorder_tabs( $tabs ) {
    
    	$tabs['description_tab']['priority'] = 5;	// Description  first
    	$tabs['wd_additional_tab_tab']['priority'] = 10; //Additional information custom tab second
    	$tabs['INSERT THE TAB CLASS HERE']['priority'] = 15; // DESCRIBE THE TAB HERE
    
    	return $tabs;
    }

    Please find this line: $tabs['INSERT THE TAB CLASS HERE']['priority'] = 15; // DESCRIBE THE TAB 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

    #349805

    auroramarinecode
    Participant

    no it did not work kindly please try to understand the question first. Last tab “people also ask” is coming from your theme (see image capture3.jpg) i want this tab on number 2. I tried taking classes exactly same as yours (see image capture.jpg) then i placed the coding in function.php (see image capture1.jpg) then i saw the page all tabs was empty (see image capture2.jpg). it looks like this was empty query and nothing is coming then i changed this “$tabs[‘description_tab’][‘priority’] = 5;” to “$tabs[‘description’][‘priority’] = 5;” then description came up. which means taking css classes does not work at all and you were taking css classes. Again i am using only description tab form woocommerce and “people also ask” tab is coming from product page custom tab.

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

    auroramarinecode
    Participant

    i found another way and i did it. Thanks

    #349861

    Hello,

    We are glad you have solved the issue.

    If you have any questions please feel free to contact us.

    Best Regards

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

The topic ‘product page custom tab orders’ is closed to new replies.