增加目录页面中的产品图像大小

问题描述 投票:0回答:5

我知道,这是一个简单的修复(它必须是),但我一直在寻找两天而且无法实现这一目标。我网站目录页面中的产品太小。

这是我的网站: http://monocleprints.com/woo/shop/

我已经尝试了所有我能想到的后端事物:

  • 在WooCommerce - >设置 - >目录中更改大小
  • 使用Thumbnail Regenerator插件调整所有缩略图的大小
  • 使用“简单图像大小”工具调整大小(在“媒体”文件夹中)

我意识到我可能需要编辑css。我该去哪儿做?

wordpress image-resizing woocommerce
5个回答
0
投票

可能有更好的方法来做到这一点,但你可以试试这个:

转到插件>编辑器>选择woocommerce插件并打开

/assets/css/woocommerce.css

找到这个:

.woocommerce ul.products li.product, .woocommerce-page ul.products li.product

并将宽度更改为更大的百分比。


0
投票

如果您使用的是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);

如有疑问,请咨询您主题的网站/支持论坛,因为问题可能已在那里提出。


0
投票

今天我花了太多时间试图弄清楚如何更改购物车中缩略图的大小,最后成功使用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;
}

我希望对你有所帮助!


0
投票

此设置已移至主题定制器。

设计 - >定制器 - > WooCommerce - > Productimages

产品页面有一个设置,目录页面有另一个设置。

在WooCommerce 3.3.3中测试过


-1
投票

我遇到了同样的问题,我找到了一个可能的解决方案。

打开更改图像大小的页面,找到循环,例如:

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();
© www.soinside.com 2019 - 2024. All rights reserved.