Filter for woocommerce tabs? How?
-
Hello.
I’m changing my theme’s single-product template. I need to remove the woocommerce tabs and re-put them one below the other.
I did it with the below code:function remove_woocommerce_product_tabs( $tabs ) { // var_dump($tabs); // var_dump($tabs['description']); unset( $tabs['description'] ); unset( $tabs['reviews'] ); unset( $tabs['additional_information'] ); unset( $tabs['custom_editor_tab'] ); unset( $tabs['custom_author_tab'] ); return $tabs; } add_filter( 'woocommerce_product_tabs', 'remove_woocommerce_product_tabs', 98 ); add_action('thegem_woocommerce_single_product_bottom', 'woocommerce_product_description_tab', 1); add_action('thegem_woocommerce_single_product_bottom', 'woocommerce_product_additional_information_tab', 2); add_action('thegem_woocommerce_single_product_bottom', 'custom_author_tab_content', 3); add_action('thegem_woocommerce_single_product_bottom', 'custom_editor_tab_content', 4);
The problem is that, now, i need to put every “tab” in a separate <div>.
I tried with this code, but is not working and i not understand why:function alpha_test($content) { $start = '<div style="background-color: #000 !important;">'; $end = '</div>'; $final = $start . $content . $end; return $final; } add_filter('custom_author_tab', 'alpha_test');
How can i solve this?
Thank you in advance.
-KryukoThe page I need help with: [log in to see the link]
- The topic ‘Filter for woocommerce tabs? How?’ is closed to new replies.