我刚刚创建了一个wordpress woocommerce商店。但是商店中的图像只有2张。一行只能容纳3个产品图片,因为图片太大。
网站网址:http://bookfare.naijatalksense.com/
请给我一些解决方法以缩小尺寸,同时使我可以连续容纳约5张产品图片。
答案 0 :(得分:0)
try {
let blob = new Blob([/*...file data...*/], {type: "appropriate/mimetype"});
let form = new FormData();
data.append("parameterName", blob);
let response = await fetch("php/upload.php", {
method: "POST",
body: data
});
if (!response.ok) {
throw new Error("HTTP status " + response.status);
}
let result = await response.text(); // or perhaps response.json()
})
// ...use the response
} catch(error) {
// ...handle/report the error
}
您也可以参考以下内容:https://docs.woocommerce.com/document/change-number-of-products-per-row/
CSS对于产品:
// Override theme default specification for product # per row
function loop_columns() {
return 5; // 5 products per row
}
add_filter('loop_shop_columns', 'loop_columns', 999);