Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #291497

    Hi

    I can not find the correct solution in other topics. Could u help me out?

    My question is: how do I change the size of the big image on a Product page to 50% of page width?

    See example url in Private Content.

    Thanks

    Tom

    #291528

    Hey Tom!

    Please go to WooCommerce > Settings > Products and change “Single product image” under “Product Image Sizes”. Then regenerate thumbnails using this plugin – http://wordpress.org/plugins/regenerate-thumbnails/
    Then add following code to Functions.php file in Appearance > Editor

    add_action( 'woocommerce_before_single_product_summary', 'avia_add_image_div', 2);
    add_action( 'woocommerce_before_single_product_summary',  'avia_close_image_div', 20);
    function avia_add_image_div()
    {
    	echo "<div class='six units single-product-main-image alpha'>";
    }
     
    function avia_close_image_div()
    {
    	global $avia_config;
    	$avia_config['currently_viewing'] = "shop_single";
     
    	echo "</div>";
    }
    
    add_action( 'woocommerce_before_single_product_summary', 'avia_add_summary_div', 25);
    add_action( 'woocommerce_after_single_product_summary',  'avia_close_summary_div', 3);
    function avia_add_summary_div()
    {
    	echo "<div class='six units single-product-summary'>";
    }

    Best regards,
    Yigit

    #291535

    Hey Yigit

    Thanks for your amazingly fast response!

    That worked, but I get an error message on the page:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘avia_close_summary_div’ not found or invalid function name in /home/wowoweb3/domains/wowowow.be/public_html/mercken/wp-includes/plugin.php on line 470

    U can see it on the live site also.

    Greetings

    Tom

    #291537

    Hey!

    Please add following code to right below the code i posted in my previous post

    function avia_close_summary_div()
    {
    	echo "</div>"; //close out the summary
    	echo "<div class='three units single-product-sidebar'>";
    	get_sidebar();
    	echo "</div>";
    }

    Best regards,
    Yigit

    #291552

    Worked! Thanks!

    #291556

    Hey!

    You are welcome Tom, glad we could help :)

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Single product image size’ is closed to new replies.