Title: Tabs ordering
Last modified: December 1, 2018

---

# Tabs ordering

 *  Resolved [MartaP](https://wordpress.org/support/users/perla77marta/)
 * (@perla77marta)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/tabs-ordering-2/)
 * How to create tabs with random ordering of the navigation elements. I mean for
   example tabs with Product1, Product2, Product3 and Products4.
    First load Product1,
   Product2, Product3, Products4 Second load Product2, Product1, Products4, Product3
   and etc. You know what I mean ?

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

 *  Plugin Contributor [yikesitskevin](https://wordpress.org/support/users/yikesitskevin/)
 * (@yikesitskevin)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/tabs-ordering-2/#post-10941692)
 * Hi [@perla77marta](https://wordpress.org/support/users/perla77marta/),
 * Unfortunately I’m not sure what you mean. What do you mean by navigation elements?
   Do you have a website you can share a link to that has these navigation elements?
 * Do you want your tabs (e.g. Tab1, Tab2, Tab3, Tab4) to be in a random order for
   each product?
 * Let me know.
 * Thank you,
    Kevin.
 *  Thread Starter [MartaP](https://wordpress.org/support/users/perla77marta/)
 * (@perla77marta)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/tabs-ordering-2/#post-10953379)
 * Hello Kevin,
 * thank you for your fast reply. Sorry for my bad explanation.
    I wish to see tabs
   buttons in random ordering after every page load. You know what I mean? Every
   time when visitor open my wordpress page where tabs published (I’ll have much
   more tabs then 4), but every time I need to show this content in random order.
   Is it possible ?
 * Thank you!
 *  Plugin Contributor [yikesitskevin](https://wordpress.org/support/users/yikesitskevin/)
 * (@yikesitskevin)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/tabs-ordering-2/#post-10953560)
 * Hi [@perla77marta](https://wordpress.org/support/users/perla77marta/),
 * Yeah, we can do this. Are you familiar with adding custom PHP functions to your
   site? This custom function will go through every tab you have and give it a random
   order. (Note it will also randomize the order of the default tabs, like Description,
   Additional Information, and Reviews, if they’re present).
 *     ```
       add_filter( 'woocommerce_product_tabs', 'yikes_woo_randomize_tab_order', 98, 1 );
   
       function yikes_woo_randomize_tab_order( $tabs ) {
   
       	$tab_count = count( $tabs );
   
       	foreach ( $tabs as $key => $tab ) {
       		$tabs[$key]['priority'] = mt_rand( 0, $tab_count );
       	}
   
       	return $tabs;
       }
       ```
   
 * Cheers,
    Kevin.

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

The topic ‘Tabs ordering’ is closed to new replies.

 * ![](https://ps.w.org/yikes-inc-easy-custom-woocommerce-product-tabs/assets/icon-
   256x256.png?rev=1558461)
 * [Custom Product Tabs for WooCommerce](https://wordpress.org/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yikes-inc-easy-custom-woocommerce-product-tabs/)
 * [Active Topics](https://wordpress.org/support/plugin/yikes-inc-easy-custom-woocommerce-product-tabs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yikes-inc-easy-custom-woocommerce-product-tabs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yikes-inc-easy-custom-woocommerce-product-tabs/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [yikesitskevin](https://wordpress.org/support/users/yikesitskevin/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/tabs-ordering-2/#post-10953560)
 * Status: resolved