WooCommerce官方免费主题:
[https://wordpress.org/themes/storefront/](https://wordpress.org/themes/storefront/)
WooCommerce Theme Support:
~~~
function mytheme_add_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );
~~~
[https://docs.woocommerce.com/document/woocommerce-theme-developer-handbook/](https://docs.woocommerce.com/document/woocommerce-theme-developer-handbook/)
WooCommerce -> 产品 -> 导入
产品demo:
[http://plugins.svn.wordpress.org/woocommerce/tags/](http://plugins.svn.wordpress.org/woocommerce/tags/)
[http://plugins.svn.wordpress.org/woocommerce/tags/4.2.2/sample-data/](http://plugins.svn.wordpress.org/woocommerce/tags/4.2.2/sample-data/)
WC Custom添加到购物车标签
[https://wordpress.org/plugins/wc-custom-add-to-cart-labels/](https://wordpress.org/plugins/wc-custom-add-to-cart-labels/)
选择显示产品的数量
[https://www.philowen.co/blog/add-a-products-per-page-dropdown-for-woocommerce/](https://www.philowen.co/blog/add-a-products-per-page-dropdown-for-woocommerce/)
选择显示的排序方式
[https://docs.woocommerce.com/document/custom-sorting-options-ascdesc/](https://docs.woocommerce.com/document/custom-sorting-options-ascdesc/)
默认的排序方式位置,wp-content\plugins\woocommerce\includes\wc-template-functions.php:
```
$catalog_orderby_options = apply_filters(
'woocommerce_catalog_orderby',
array(
'menu_order' => __( 'Default sorting', 'woocommerce' ),
'popularity' => __( 'Sort by popularity', 'woocommerce' ),
'rating' => __( 'Sort by average rating', 'woocommerce' ),
'date' => __( 'Sort by latest', 'woocommerce' ),
'price' => __( 'Sort by price: low to high', 'woocommerce' ),
'price-desc' => __( 'Sort by price: high to low', 'woocommerce' ),
)
);
```
在functions.php里修改为:
```
/**
* Add custom sorting options (asc/desc)
*/
add_filter( 'woocommerce_catalog_orderby', 'custom_woocommerce_catalog_orderby' );
function custom_woocommerce_catalog_orderby( $sortby ) {
$sortby['menu_order'] = __( 'Default sorting', 'woocommerce' );
$sortby['popularity'] = __( 'Sort by popularity', 'woocommerce' );
$sortby['rating'] = __( 'Sort by average rating', 'woocommerce' );
$sortby['date'] = __( 'Sort by latest', 'woocommerce' );
$sortby['price'] = __( 'Sort by price: low to high', 'woocommerce' );
$sortby['price-desc'] = __( 'Sort by price: high to low', 'woocommerce' );
// unset($sortby['menu_order']);
unset($sortby['popularity']);
unset($sortby['rating']);
// unset($sortby['date']);
// unset($sortby['price']);
// unset($sortby['price-desc']);
return $sortby;
}
```
- WordPress平台的网站开发
- 电商主题开发
- WooCommerce主题开发优化部分
- 首页开发
- WooCommerce
- 判断用户是否登录
- WordPress Menu
- WooCommerce PayPal Checkout Gateway
- 页面和文章
- 调用产品和文章
- 判断属于哪个页面
- 相关文章
- 消除文章分享按钮集底部的文字
- wordpress主题模板和主题开发
- wordpress主题准备
- wordpress主题文件结构
- 豪源主题
- WooCommerce SEO
- 插件开发
- wordpress二次开发
- theme基本显示
- menu调用
- 分拆为header.php和footer.php
- 页面、文章样式选择显示
- 面包屑导航 Breadcrumb
- 特色图
- 阅读次数统计
- 分页功能
- Advanced Custom Fields
- Custom Post Type UI
- post type
- 小工具
- 小工具调用
- shortcode
- 文章循环输出
- 标题和文章限制字数输出显示
- WordPress主題theme1开发
- wordpress搭建多站点
- wordpress常用函數
- wordpress循环代码
- Woocommerce
- Woocommerce支持
- WordPress插件开发
- wordpress会员插件
- WordPress插件使用
- WordPress插件集
- WordPress的核心
- Wordpress原理
- Wordpress要点
- WordPress网站搬家
- WPML
- 服务器
- Cloud 9
- test
- 网站