Last active
February 16, 2026 12:19
-
-
Save jmabbas/26b83c9f2b5069e6adf776041bded79c to your computer and use it in GitHub Desktop.
Furnique - Load tab view on single product tabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('wp_footer', function () { | |
| if ( ! is_product() ) return; | |
| ?> | |
| <script> | |
| jQuery(document).ready(function($){ | |
| const $tabsWrapper = $('.woocommerce-tabs'); | |
| const $tabsList = $tabsWrapper.find('ul.tabs'); | |
| $('.woocommerce-Tabs-panel > li[role="presentation"]').each(function(){ | |
| $(this).appendTo($tabsList); | |
| }); | |
| $tabsWrapper.removeClass('is-style-accordion'); | |
| $('.woocommerce-Tabs-panel').hide(); | |
| $('.woocommerce-Tabs-panel.active').show(); | |
| $tabsList.find('a').off('click').on('click', function(e){ | |
| e.preventDefault(); | |
| const target = $(this).attr('href'); | |
| $tabsList.find('li').removeClass('active'); | |
| $(this).parent().addClass('active'); | |
| $('.woocommerce-Tabs-panel').hide().removeClass('active'); | |
| $(target).show().addClass('active'); | |
| }); | |
| }); | |
| </script> | |
| <?php | |
| }, 999); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs { | |
| display:block; | |
| } | |
| .woocommerce div.product .woocommerce-tabs .panel { | |
| display: none !important; | |
| } | |
| .wp-block-woocommerce-product-details.is-style-accordion .wc-tab h2, | |
| .woocommerce div.product .woocommerce-tabs .panel.active { | |
| display: block !important; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment