如何在 Easy Digital Downloads 结账页面上更改产品图片缩略图大小

正在查看 2 个帖子:1-2 (共 2 个帖子)
  • 作者
    帖子
  • 诗语
    管理员
    • 文章数量: 5,930
    @feibisi
    楼主

    默认情况下,EDD 结帐页上的产品缩略图显示非常小 (25 x 25) 。以下是用于设置相同的自定义图像大小的代码片段:

    add_filter( 'edd_checkout_image_size', 'filter_edd_checkout_image_size', 10, 1 );
    /**
     * Change product image thumbnail size on Easy Digital Downloads checkout page.
     *
     * @param array $array default image size (25 x 25).
     * @return custom image size
     */
    function filter_edd_checkout_image_size( $array ) {
        return array( 777, 0 );
    }

    在上面,我将宽度设置为 777px,并让 WordPress 使用每个图像纵横比的比例高度。

    更改前:

    更改后:

    具体的应用尺寸,你可以根据自己的实际情况进行调整,一般的差不多 100~200px 之间合适。

    诗语
    管理员
    • 文章数量: 5,930
    @feibisi
    楼主
    此回复已被标记为私有,🔒 仅楼主及管理员可见。
正在查看 2 个帖子:1-2 (共 2 个帖子)
  • 哎呀,回复话题必需登录。

话题信息

  • 当前位于:Easy Digital Downloads
  • 1 条回复
  • 1 个参与人
  • 最后回复:<a href="https://bbs.weixiaoduo.com/users/feibisi/" title=" 查看诗语的个人资料" class="bbp-author-link"><span class="bbp-author-name"> 诗语</span></a>
  • 上次活动:<a href="https://bbs.weixiaoduo.com/topic/25296/#post-25297" title=" 回复至:如何在 Easy Digital Downloads 结账页面上更改产品图片缩略图大小">7 年、 1 月前</a>