Home Forums WoodMart support forum Moving produt product title and breadcrums above image gallery.

Moving produt product title and breadcrums above image gallery.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #55713

    Stanislaw
    Participant

    Hello,
    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 regards

    #55721

    Hello,

    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

    #55881

    Stanislaw
    Participant

    Hi.
    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 Regards

    Attachments:
    You must be logged in to view attached files.
    #55883

    Stanislaw
    Participant

    Another screenshot.

    Attachments:
    You must be logged in to view attached files.
    #55918

    Hello,

    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

    #56204

    Stanislaw
    Participant

    Hello,
    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 regards

    #56248

    Eric Watson
    Participant

    Hello,

    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 Studio

    #56403

    Stanislaw
    Participant

    Hello,
    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
    SH

    #56409

    Hello,

    The way you suggest can be realized only via templates modifications.

    Best Regards

    #93462

    Anonymous
    Inactive

    Hi, 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?

    #93521

    Hello,

    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

    #112130

    Anonymous
    Inactive

    HI 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 );

    #112136

    Artem Temos
    Keymaster

    Yes, 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.

Viewing 13 posts - 1 through 13 (of 13 total)