我知道,这是一个简单的修复(它必须是),但我一直在寻找两天而且无法实现这一目标。我网站目录页面中的产品太小。
这是我的网站: http://monocleprints.com/woo/shop/
我已经尝试了所有我能想到的后端事物:
我意识到我可能需要编辑css。我该去哪儿做?
可能有更好的方法来做到这一点,但你可以试试这个:
转到插件>编辑器>选择woocommerce插件并打开
/assets/css/woocommerce.css
找到这个:
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product
并将宽度更改为更大的百分比。
如果您使用的是woocommerce主题,则应在主题目录中查看woocommerce配置文件。这些配置文件通常在图像上进行最终样式设置。例如,该文件可能是your_theme/config-woocommerce/config.php
,您可以在其中找到类似的内容:
//product thumbnails
$avia_config['imgSize']['shop_thumbnail'] = array('width'=>80, 'height'=>80);
$avia_config['imgSize']['shop_catalog'] = array('width'=>450, 'height'=>355);
$avia_config['imgSize']['shop_single'] = array('width'=>450, 'height'=>355);
如有疑问,请咨询您主题的网站/支持论坛,因为问题可能已在那里提出。
今天我花了太多时间试图弄清楚如何更改购物车中缩略图的大小,最后成功使用CSS,如下所示:
.woocommerce table.cart img, .woocommerce #content table.cart img,
.woocommerce-page table.cart img, .woocommerce-page #content table.cart img {
width: 90px;
height: auto;
padding: none !important;
}
我希望对你有所帮助!
此设置已移至主题定制器。
设计 - >定制器 - > WooCommerce - > Productimages
产品页面有一个设置,目录页面有另一个设置。
在WooCommerce 3.3.3中测试过
我遇到了同样的问题,我找到了一个可能的解决方案。
打开更改图像大小的页面,找到循环,例如:
if ( have_posts() ) : while ( have_posts() ) : the_post();
// Loop code, thumbnail woocommerce function, etc
endwhile; endif;
并将其替换为以下代码:
query_posts($args); // Note: if there's no arguments for the query, it can be empty
//loop code, call the default thumnail function! the_post_thumnail()
rewind_posts();