Home / Forums / WoodMart support forum / On Product Page Move Product tab and Related Products
Home › Forums › WoodMart support forum › On Product Page Move Product tab and Related Products
On Product Page Move Product tab and Related Products
- This topic has 5 replies, 2 voices, and was last updated 7 years, 9 months ago by  Artem Temos. Artem Temos.
- 
		AuthorPosts
- 
		
			
				January 23, 2018 at 10:04 am #34938
 HareshParticipantHello, I Want to move “Product Tab” and “Related Products” section, after product image summary section. Please check my screenshot. Any help will be appreciated. Thanks in advance! Attachments:You must be logged in to view attached files.January 23, 2018 at 10:54 am #34960 
 Artem TemosKeymasterHi, There is no such function in our theme so you will need to make some extra customization to achieve this. 1. Add this snippet to the functions.phpfile in the child themeadd_action( 'wp', 'woodmart_disable_related', 10000 ); function woodmart_disable_related() { remove_action( 'woodmart_woocommerce_after_sidebar', 'woocommerce_output_related_products', 20 ); }2. Create a file woodmart-child/woocommerce/content-single-product.phpwith the following content<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly $product_images_class = woodmart_product_images_class(); $product_summary_class = woodmart_product_summary_class(); $single_product_class = woodmart_single_product_class(); $content_class = woodmart_get_content_class(); $product_design = woodmart_product_design(); $container_summary = 'container'; if( woodmart_get_opt( 'single_full_width' ) ) { $container_summary = 'container-fluid'; } ?> <?php if ( $product_design == 'alt' ): ?> <div class="single-breadcrumbs-wrapper"> <div class="container"> <?php woocommerce_breadcrumb(); ?> <?php if ( woodmart_get_opt( 'products_nav' ) ): ?> <?php woodmart_products_nav(); ?> <?php endif ?> </div> </div> <?php endif ?> <div class="container"> <?php do_action( 'woocommerce_before_single_product' ); ?> </div> <div id="product-<?php the_ID(); ?>" <?php post_class( $single_product_class ); ?>> <div class="<?php echo esc_attr( $container_summary ); ?>"> <div class="row product-image-summary-wrap"> <div class="product-image-summary <?php echo esc_attr( $content_class ); ?>"> <div class="row product-image-summary-inner"> <div class="<?php echo esc_attr( $product_images_class ); ?> product-images"> <div class="product-images-inner"> <?php do_action( 'woocommerce_before_single_product_summary' ); ?> </div> </div> <div class="<?php echo esc_attr( $product_summary_class ); ?> summary entry-summary"> <div class="summary-inner"> <?php if ( $product_design == 'default' ): ?> <div class="single-breadcrumbs-wrapper"> <div class="single-breadcrumbs"> <?php woocommerce_breadcrumb(); ?> <?php if ( woodmart_get_opt( 'products_nav' ) ): ?> <?php woodmart_products_nav(); ?> <?php endif ?> </div> </div> <?php endif ?> <?php do_action( 'woocommerce_single_product_summary' ); ?> </div> </div> </div><!-- .summary --> <div class="product-tabs-wrapper"> <div class="container"> <div class="row"> <div class="col-sm-12 poduct-tabs-inner"> <?php do_action( 'woocommerce_after_single_product_summary' ); ?> </div> </div> </div> </div> </div> <?php do_action( 'woocommerce_sidebar' ); ?> </div> <?php do_action( 'woodmart_after_product_content' ); ?> </div> <?php do_action( 'woodmart_after_product_tabs' ); ?> </div><!-- #product-<?php the_ID(); ?> --> <?php do_action( 'woocommerce_after_single_product' ); ?>Regards January 23, 2018 at 11:13 am #34963
 HareshParticipantHello, Thank you so much for your kind response, it is working perfectly for only “Product Tab“. But “Related Product” section is not showing. Can you please check it once. I want to show it after “Product Tab”. Thanks. January 23, 2018 at 12:22 pm #34977 
 Artem TemosKeymasterSorry, try to replace the code for functions.phpfile with this oneadd_action( 'wp', 'woodmart_disable_related', 10000 ); function woodmart_disable_related() { remove_action( 'woodmart_woocommerce_after_sidebar', 'woocommerce_output_related_products', 20 ); add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 30 ); }January 23, 2018 at 12:37 pm #34983
 HareshParticipantHello, It is working fine, Thank Thank so much. January 23, 2018 at 12:42 pm #34985 
 Artem TemosKeymasterGreat, you are welcome. 
- 
		AuthorPosts
- You must be logged in to create new topics. Login / Register