Home › Forums › WoodMart support forum › Moving produt product title and breadcrums above image gallery.
Moving produt product title and breadcrums above image gallery.
- This topic has 12 replies, 5 voices, and was last updated 5 years, 6 months ago by
Artem Temos.
-
AuthorPosts
-
May 2, 2018 at 2:57 pm #55713
StanislawParticipantHello,
is there any chance to move product title and breadcrumbs above image gallery? Just like in our old shop? Another question – is there an option to enable left column for the whole product including description? Link to the example below.
Best regardsMay 2, 2018 at 3:57 pm #55721
Elise NoromitMemberHello,
What page do you mean? Please send the link. If you mean WooCommerce templates it would not be possible. Please send your page link.
Best Regard
May 3, 2018 at 4:03 pm #55881
StanislawParticipantHi.
Yes, as far as I know, Woodmart is Woocommerce template. The link was an example of our old shop as I have written, where this kind of layout was implemented. Screenshots and link to the shop below.
Best RegardsAttachments:
You must be logged in to view attached files.May 3, 2018 at 4:05 pm #55883May 3, 2018 at 7:29 pm #55918
Elise NoromitMemberHello,
In order to replace title and other elements of the page, you will need to customize the product page template, such modification cannot be made by custom CSS.
Best Regards
May 5, 2018 at 9:33 am #56204
StanislawParticipantHello,
I have found a solution to move the title and it was really easy and requires 2 line of codes no searius coding.
The snippet:
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );
add_action( ‘woocommerce_before_single_product’, ‘woocommerce_template_single_title’, 2 );I have also found a snippet to remove breadcrumbs and I have an idea to put it above new title position. It’s snippet for original woocommerce position and won’t work with Woodmart theme. Could you provide me a solution for this?
Woocommerce snippet:
/**
* Remove the breadcrumbs
*/
add_action( ‘init’, ‘woo_remove_wc_breadcrumbs’ );
function woo_remove_wc_breadcrumbs() {
remove_action( ‘woocommerce_before_main_content’, ‘woocommerce_breadcrumb’, 20, 0 );
}
Best regardsMay 5, 2018 at 1:24 pm #56248
Eric WatsonParticipantHello,
Try to add the following PHP code snippet to the child theme functions.php file
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); add_action( 'woocommerce_before_single_product', 'woocommerce_template_single_title', 2 );
then create woocommerce/content-single-product.php file and add the following code
<?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(); $breadcrumbs_position = woodmart_get_opt( 'single_breadcrumbs_position' ); $container_summary = 'container'; if( woodmart_get_opt( 'single_full_width' ) ) { $container_summary = 'container-fluid'; } ?> <div class="container"> <?php do_action( 'woocommerce_before_single_product' ); if ( post_password_required() ) { echo get_the_password_form(); return; } ?> </div> <div id="product-<?php the_ID(); ?>" <?php post_class( $single_product_class ); ?>> <div class="<?php echo esc_attr( $container_summary ); ?>"> <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> <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 do_action( 'woocommerce_single_product_summary' ); ?> </div> </div> </div><!-- .summary --> </div> <?php do_action( 'woocommerce_sidebar' ); ?> </div> <?php do_action( 'woodmart_after_product_content' ); ?> </div> <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> <?php do_action( 'woodmart_after_product_tabs' ); ?> </div><!-- #product-<?php the_ID(); ?> --> <?php do_action( 'woocommerce_after_single_product' ); ?>
Kind Regards
XTemos StudioMay 7, 2018 at 7:29 am #56403
StanislawParticipantHello,
Thank you for your help, it works but I have read that overriding templates is not a best practice because when the Woocommerce will update you will have a not updated template. Is there a way to make it with remove_action, add_action commands?
Best regards
SHMay 7, 2018 at 8:19 am #56409
Elise NoromitMemberHello,
The way you suggest can be realized only via templates modifications.
Best Regards
December 3, 2018 at 4:04 pm #93462
AnonymousInactiveHi, when I add the above code for moving the product title my product sliders are disabled on mobile device.
Would you know how to fix this issue?December 3, 2018 at 7:57 pm #93521
Elise NoromitMemberHello,
Customization of Woocommerce template is not covered by our support. We do not have a quick solution either, otherwise, we would have provided.
Best Regards
March 10, 2019 at 3:57 pm #112130
AnonymousInactiveHI can I have help moving price beside the title with the PHP customization
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );
add_action( ‘woocommerce_before_single_product’, ‘woocommerce_template_single_title’, 2 );March 10, 2019 at 4:33 pm #112136
Artem TemosKeymasterYes, you can try to use that code but we not responsible for that and can’t guarantee that it will work as you expected since it is not a part of the theme.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register