开发者 |
edgewebware
aibrean |
---|---|
更新时间 | 2020年3月7日 06:04 |
捐献地址: | 去捐款 |
PHP版本: | 4.0.0 及以上 |
WordPress版本: | 4.6.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
wp_enqueue_script('jquery');
wp_dequeue_script('lazyload-call');
. See http://www.appelsiini.net/projects/lazyload for a full rundown of options (trigger loading, effects, images in containers, nonsequential images, invisible images, etc.).
If you would like to send an email directly for support, contact us via the form at https://edgewebware.com/plugins/.Since it's fairly basic it should. It's a very lightweight plugin.
You will need to manually call in jQuery support if you don't already have it running (see Installation Instructions).
Your WooCommerce installation needs to support shop_catalog
which has been an initiated image size since WooCommerce 1.6.2 at least.
Secondarily, there should be support for WooCommerce's placeholder image (not an absolute requirement for loading since you can put in your own, but the tab may not be visible or in the same location in older versions of WooCommerce). The placeholder image function for WooCommerce has been updated to wc_placeholder_img_src
so previous instances of woocommerce_placeholder_img_src
have been deprecated as of 2.1.0.
We are basically replacing WooCommerce's hook of woocommerce_template_loop_product_thumbnail
with our own (for Lazy Load). This is used in the content-product.php
template file. If your WooCommerce theme has been customized (YOURTHEME/woocommerce/content-product.php) then in some cases this has been altered. The hook runs as part of do_action( 'woocommerce_before_shop_loop_item_title' )
.
We've done the same in version 1.3 of our plugin with woocommerce_subcategory_thumbnail
.
It would probably be best if you were to manually configure the source LazyLoad script (http://www.appelsiini.net/projects/lazyload) to reduce code bloat. It is possible to use our plugin and then add the class "lazy" to your image and replace the image src with your placeholder image and add data-original
to link to your thumbnail. You would also need to add width/height to the image element.
woocommerce_placeholder_img_src
and replaced with the current (as of WC 2.1.0) wc_placeholder_img_src
shop_catalog
which is set under WooCommerce > Settings > Products > Display.$llwoo_image_src
so it would match the shop catalog dimensions.call-ll.js
"not a function" error