Archived topic
Order of Woocommerce Single Product Page Tabs
5 replies · Started by Kim on October 2, 2019
Viewing posts 1–6 of 6
Hi there, would it be possible to show the Woocommerce Tabs one below the other like in this in example?
Best regards!
Hi there,
try this PHP snippet - it will remove the tabs and the call each of the template parts to display them in a stack:
add_action( 'after_setup_theme','db_stack_product_tabs' );
function db_stack_product_tabs(){
// Remove product tabs
remove_action('woocommerce_after_single_product_summary','woocommerce_output_product_data_tabs', 10 );
// Get tab content template parts
add_action('woocommerce_after_single_product_summary','db_get_tab_template_parts', 10 );
}
function db_get_tab_template_parts() {
// Include required template parts
?>
<div class="woo-description-section"><?php wc_get_template( 'single-product/tabs/description.php' ); ?></div>
<div class="woo-information-section"><?php wc_get_template( 'single-product/tabs/additional-information.php' ); ?></div>
<?php comments_template();
}
Hi David,
it returns an error saying "syntax error, unexpected end of file" in line 16. What do I have to change?
I made an edit to the above code.
Awesome! Works well :-)
Awesome - hadn't tried it before so glad to hear that.
This archived topic is closed to new replies.