<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 商品列表頁配置 ***** ## 1,產品屬性過濾 (Product Filtering), Layered Nav widget ![](https://img.kancloud.cn/b2/8c/b28cb435eee3817424367178cb1369ea_984x739.png) 實現方法:管理后臺自定義設計 **Appearance > Customize > widget > sidebar** 選擇對應 filter 則可以: ![](https://img.kancloud.cn/ff/f6/fff6598ab7a59f81af050e122853098c_345x521.png) ***** ***** ## 2,列表 促銷/優惠圖標 (Promotion Icon) 列表模板已經有這功能,只需要自定義樣式則可以。 ![](https://img.kancloud.cn/3f/cb/3fcb88042877ca378ad528380019b0ce_757x724.png) ![](https://img.kancloud.cn/0f/5e/0f5e1da9020d2b16772a2f40ed80d8e5_692x421.png) ### 3,更多自定義樣式,可參考: [WooCommerce Smart Sale Badge – WordPress plugin | WordPress.org](https://wordpress.org/plugins/woocommerce-smart-sale-badge/) [Sales Countdown Timer – WordPress plugin | WordPress.org](https://wordpress.org/plugins/sales-countdown-timer/) ![](https://img.kancloud.cn/8e/f5/8ef549080e4c06c943a2e414da0f4172_840x448.png) ## 4,改變列表頁數 ``` add_filter( 'loop_shop_columns', 'woocommerce_cookbook_loop_shop_columns', 20 ); function woocommerce_cookbook_loop_shop_columns( $cols ) { return 3; } ``` ***** ***** ***** ## 5,自定義排序 ``` // Add a new sorting option add_filter( 'woocommerce_default_catalog_orderby_options','woocommerce_cookbook_catalog_orderby' ); add_filter( 'woocommerce_catalog_orderby','woocommerce_cookbook_catalog_orderby' ); function woocommerce_cookbook_catalog_orderby( $sortby ) { $sortby['oldest_to_newest'] = __( 'Sort by oldest to newest', 'woocommerce' ); return $sortby; } // Add sorting oldest to newest functionality to sorting dropdown add_filter( 'woocommerce_get_catalog_ordering_args','woocommerce_cookbook_get_catalog_ordering_args' ); function woocommerce_cookbook_get_catalog_ordering_args($args ) { // get the orderby value $orderby_value = isset( $_GET['orderby'] ) ? wc_clean($_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); // if the orderby value matches our custom option if ( 'oldest_to_newest' == $orderby_value ) { $args['orderby'] = 'date'; $args['order'] = 'ASC'; } return $args; } ``` ## 6,展示品類圖片 ``` function woocommerce_cookbook_category_image() { if ( is_product_category() ){ global $wp_query; $cat = $wp_query->get_queried_object(); $thumbnail_id = intval( get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true ) ); $image = wp_get_attachment_url( $thumbnail_id ); if ( $image ) { echo '<img src="' . esc_url( $image ) . '" alt="" />'; } } add_action( 'woocommerce_archive_description', 'woocommerce_cookbook_category_image', 2 ); ``` ## 7,列表內容過濾、自定義列表內容 例子:怎樣去掉特定分類 ``` //Removing a product category from the Shop page add_action( 'pre_get_posts', 'woocommerce_cookbook_pre_get_posts_query' ); function woocommerce_cookbook_pre_get_posts_query( $q ) { if ( ! $q->is_main_query() ) return; if ( ! $q->is_post_type_archive() ) return; if ( ! is_admin() && is_shop() ) { $q->set( 'tax_query', array(array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => array( 'posters' ), 'operator' => 'NOT IN' ))); } remove_action( 'pre_get_posts', 'woocommerce_cookbook_pre_get_posts_query' ); } ``` ## 8,產品雙圖片/多圖片展示 (Multiple images on PLP) TODO
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看