-
AuthorPosts
-
July 15, 2014 at 11:02 am #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
July 15, 2014 at 12:21 pm #291528Hey 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 > Editoradd_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,
YigitJuly 15, 2014 at 12:39 pm #291535Hey 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
July 15, 2014 at 12:41 pm #291537Hey!
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,
YigitJuly 15, 2014 at 12:56 pm #291552Worked! Thanks!
July 15, 2014 at 1:01 pm #291556 -
AuthorPosts
- The topic ‘Single product image size’ is closed to new replies.