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
- 網站