Categories

有特色的模板

WooCommerce. 如何删除产品图像占位符

丹尼尔·莫拉莱斯 2015年10月19日
Rating: 5.0/5. 来自4票.
Please wait...

本教程将向您展示如何 删除产品图像 placeholder 在你的WooCommerce商店.

WooCommerce. 如何删除产品图像占位符

有时,商店中的商品不需要产品图像. 但是如果一个产品没有与之相关的图像, 然后WooCommerce自动添加默认值 placeholder 产品形象.

Default placeholder image 看起来像这样:

WooCommerce_How_to_remove_products_images_placeholder_1

让我们来看看怎么做 remove placeholder images 对产品.

  1. 访问您的服务器,使用any ftp client or FileManager:

    WooCommerce_How_to_remove_products_images_placeholder_2
  2. Navigate to “wp-content /主题/ themeXXXXX /包括” 文件夹, XXXXX 数字是你的主题吗.

  3. Open ‘custom-function.php’ 与任何文件归档 php/text editor:

    WooCommerce_How_to_remove_products_images_placeholder_3
  4. 将以下行添加到文件的最开头,就在下面 tag:

    Remove_action ('woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20);
    WooCommerce_How_to_remove_products_images_placeholder_4
  5. 刷新你的 website 要查看变化.

这将删除产品图像 placeholder 从产品页面出发,但可以保留栏目完整,将页面内容推过来;

WooCommerce_How_to_remove_products_images_placeholder_5

如果发生这种情况,您将不得不使用一些来修复样式问题 custom CSS. 您使用的确切规则以及如何进行此修改将取决于您的特定主题.

  1. 我们建议您使用 FireBug plugin for FireFox browser 来检查元素和编辑CSS.

  2. 基本上,你只需要调整产品描述列的宽度值:

    WooCommerce_How_to_remove_products_images_placeholder_6
  3. 将宽度值更改为 ‘100%’:

    WooCommerce_How_to_remove_products_images_placeholder_7
  4. Copy new rule 声明:

    WooCommerce_How_to_remove_products_images_placeholder_8
  5. 粘贴到 Custom Css box of the 樱桃的选项:

    WooCommerce_How_to_remove_products_images_placeholder_9
  6. 刷新你的 website 要查看变化.

本教程到此结束. 请随时查看下面的详细视频教程:

WooCommerce. 如何删除产品图像占位符
这个条目被张贴了出来 WooCommerce教程 and tagged image, placeholder, product, remove, WooCommerce. 书签的 permalink.

提交罚单

如果您仍然无法找到关于您的问题的足够的教程,请使用以下链接向我们的技术支持团队提交请求. 我们将在接下来的24小时内为您提供我们的帮助和协助: 提交罚单