Tagged: x
-
AuthorPosts
-
April 28, 2016 at 9:32 am #904187
djebyParticipantHello,
I have a question.
I want to modify the product page and I want to get rid of the tabbed section.
I do not want tabs, I want the information to be on columns. How can I do that?What do I have to modify and where?
Basically the description will be there, on 3/4, and on the right side, there will be 1/4 for example a list.
So 3/4 of the row will be the description, and on the 1/4 of the row will be Related products for example.
I just want to get rid of the tabs, but keep the information in that section.
April 28, 2016 at 9:37 am #904191
djebyParticipantI disabled the “Product Tabs” from customizer, but now whatever shortcode I add in the Product, it doesn`t show it anymore.
What should i do?April 28, 2016 at 10:16 pm #905093
RadModeratorHi there,
Thanks for posting in.
Do not disable them in customizer, but you’ll need to customize the template through coding to remove the tabs.
1. Please duplicate this file \wp-content\themes\x\woocommerce\single-product\tabs\tabs.php into your child theme (eg. \wp-content\themes\x-child\woocommerce\single-product\tabs\tabs.php )
2. Edit it and remove the tabs and apply your own layout. You may use X’s column shortcodes to manipulate the layout.
For example,
<?php // ============================================================================= // WOOCOMMERCE/SINGLE-PRODUCT/TABS/TABS.PHP // ----------------------------------------------------------------------------- // @version 2.4.0 // ============================================================================= if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } $tabs = apply_filters( 'woocommerce_product_tabs', array() ); if ( ! empty( $tabs ) ) : ?> <?php if ( x_get_option( 'x_woocommerce_product_tabs_enable' ) == '1' ) : ?> <?php foreach ( $tabs as $key => $tab ) : ?> <?php ob_start(); ?> <h2><?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', esc_html( $tab['title'] ), $key ); ?></h2> <div class="x-tab-content"> <?php call_user_func( $tab['callback'], $key, $tab ); ?> </div> <?php $tab_contents[] = ob_get_clean(); ?> <?php endforeach; echo do_shortcode('[x_column type="3/4"]'.$tab_contents[0].'[/x_column][x_column type="1/4"]'.$tab_contents[1].'[/x_column]'); ?> <?php endif; ?> <?php endif; ?>There are many ways, it depends on what you wish to achieve.
Thanks!
April 29, 2016 at 2:56 am #905291
djebyParticipantThanks.
April 29, 2016 at 1:43 pm #906029
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-904187 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
