Title: WooCommerce Grid / List toggle
Author: James Koster
Published: <strong>2012 年 8 月 25 日</strong>
Last modified: 2018 年 5 月 11 日

---

搜索插件

![](https://ps.w.org/woocommerce-grid-list-toggle/assets/banner-772x250.jpg?rev=
1184140)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/woocommerce-grid-list-toggle/assets/icon-256x256.jpg?rev=1184147)

# WooCommerce Grid / List toggle

 作者：[James Koster](https://profiles.wordpress.org/jameskoster/)

[下载](https://downloads.wordpress.org/plugin/woocommerce-grid-list-toggle.1.2.1.zip)

 * [详情](https://cn.wordpress.org/plugins/woocommerce-grid-list-toggle/#description)
 * [评价](https://cn.wordpress.org/plugins/woocommerce-grid-list-toggle/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/woocommerce-grid-list-toggle/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/woocommerce-grid-list-toggle/#developers)

 [支持](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/)

## 描述

WooCommerce Grid / List toggle is a simple plugin which adds a grid / list toggle
button to your product archives allowing users to toggle between grid / list views
of your products on your WooCommerce store.

The list view arranges products in a vertical list and pulls in the excerpt to give
a more detailed overview.

The grid view you will be familiar with as this is WooCommerce’s default layout 
for product archives.

The store owner can choose whether grid or list view be set as the default via the“
WooCommerce” > “Product Catalog” section of the Customizer.

Please feel free to contribute on [github](https://github.com/jameskoster/woocommerce-grid-list-toggle).

## 屏幕截图

 * [[
 * List view.

## 安装

 1. Upload `woocommerce-grid-list-toggle` to the `/wp-content/plugins/` directory
 2. 通过WordPress的“插件”菜单激活插件
 3. Choose the default setting on the catalog tab of the WooCommerce settings screen
 4. Done!

## 常见问题

  Installation Instructions

 1. Upload `woocommerce-grid-list-toggle` to the `/wp-content/plugins/` directory
 2. 通过WordPress的“插件”菜单激活插件
 3. Choose the default setting on the catalog tab of the WooCommerce settings screen
 4. Done!

  It doesn’t work with my theme, what gives?

You may see varied results depending on how the theme has been built and whether
it’s already pulling the excerpt into product archives. I’ve tried to cover all 
bases with CSS but it’s likely you’ll need to make your own adjustments. WooCommerce
Grid / List toggle has been tested with Twenty Ten, Twenty Eleven and Twenty Twelve.

  I found and fixed a bug how can I help?

Thanks! Please fork the repo on [github](https://github.com/jameskoster/woocommerce-grid-list-toggle),
push your fix then send a pull request.

  I don’t like the button styles, how can I remove them and start fresh?

Add the following code to the functions.php file in your theme / child theme:

    ```
    add_action( 'wp_enqueue_scripts', 'remove_gridlist_styles', 30 );
    function remove_gridlist_styles() {
        wp_dequeue_style( 'grid-list-button' );
    }
    ```

That will remove the button styles but keep the layout styles which will allow you
to design the buttons as you see fit.

To remove the layout styles as well use:

    ```
    add_action('wp_enqueue_scripts', 'remove_gridlist_styles', 30);
    function remove_gridlist_styles() {
        wp_dequeue_style( 'grid-list-button' );
        wp_dequeue_style( 'grid-list-layout' );
    }
    ```

## 评价

![](https://secure.gravatar.com/avatar/0b4722885b86cfe484b2177618083a0cefd1bb5da226e62594bd8364e61c12cb?
s=60&d=retro&r=g)

### 󠀁[works](https://wordpress.org/support/topic/works-2250/)󠁿

 [michael](https://profiles.wordpress.org/mvandiermen/) 2025 年 8 月 11 日

it works

![](https://secure.gravatar.com/avatar/3099fedbf9ac7e1f03a1f8fffb36647f1b6fdc691b998c0a48b544d2f6b09e52?
s=60&d=retro&r=g)

### 󠀁[It´s a pity](https://wordpress.org/support/topic/its-a-pity/)󠁿

 [egocefalo](https://profiles.wordpress.org/egocefalo/) 2021 年 10 月 12 日

Just another dead plugin.

![](https://secure.gravatar.com/avatar/c4013d605692b83e8352621b52cd24ca743bd7918df5ddad2677f9136d775ff8?
s=60&d=retro&r=g)

### 󠀁[Works but poor Core Web Vitals](https://wordpress.org/support/topic/works-but-poor-core-web-vitals/)󠁿

 [mesmer7](https://profiles.wordpress.org/mesmer7/) 2021 年 7 月 19 日

It’s simple and it works. But there is a huge Cumulative Layout Shift. This causes
terrible performance in Google’s PageSpeed Insights. Also, now that WordPress has
updated jQuery, this plugin is dependent on obsolete code.

![](https://secure.gravatar.com/avatar/1fd83348755ca4151658beb51aac3b6073f4ba43321187388f9601de3a9b4536?
s=60&d=retro&r=g)

### 󠀁[Отличный плагин! Давно пользуюсь](https://wordpress.org/support/topic/%d0%be%d1%82%d0%bb%d0%b8%d1%87%d0%bd%d1%8b%d0%b9-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-%d0%b4%d0%b0%d0%b2%d0%bd%d0%be-%d0%bf%d0%be%d0%bb%d1%8c%d0%b7%d1%83%d1%8e%d1%81%d1%8c/)󠁿

 [Andrews32](https://profiles.wordpress.org/andrews32/) 2021 年 2 月 24 日

От сайта к сайту, устанавливаю только его. работает “из коробки” без багов. Запоминает
в cookie выбор посетителя (gird или list). Рекомендую!

![](https://secure.gravatar.com/avatar/4f2fc531ea1039f011803504ebdc11dc5bdd13e53466a2703ecddb81deaa6870?
s=60&d=retro&r=g)

### 󠀁[Causes issue](https://wordpress.org/support/topic/causes-issue/)󠁿

 [dtsinidaho](https://profiles.wordpress.org/dtsinidaho/) 2021 年 2 月 14 日

it messes with the woocommerce DiviGear carousel.

![](https://secure.gravatar.com/avatar/db1d59ef27fda41c4c584de892f37c702ccf2b30e56dcbab1fb0d22b2c3f3faf?
s=60&d=retro&r=g)

### 󠀁[The best!](https://wordpress.org/support/topic/the-best-1821/)󠁿

 [marlinka](https://profiles.wordpress.org/marlinka/) 2020 年 7 月 18 日

Hello James! Your plugun very cool!!! Please update) Thanks soo much!

 [ 阅读所有31条评价 ](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/reviews/)

## 贡献者及开发者

「WooCommerce Grid / List toggle」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ James Koster ](https://profiles.wordpress.org/jameskoster/)

「WooCommerce Grid / List toggle」插件已被翻译至 7 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/woocommerce-grid-list-toggle/contributors)
为本插件所做的贡献。

[帮助将「WooCommerce Grid / List toggle」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/woocommerce-grid-list-toggle)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/woocommerce-grid-list-toggle/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/woocommerce-grid-list-toggle/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/woocommerce-grid-list-toggle/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/woocommerce-grid-list-toggle/)。

## 更新日志

#### 1.2.1 – 11/05/18

 * Hide debug info.

#### 1.2.0 – 01/05/18

 * Moved the settings to the Customizer (WooCommerce > Product Catalog)
 * Removed unnecessary .less files
 * Tweaked button styles
 * Full compatibility with Storefront theme

#### 1.1.0 – 12/12/16

 * Outputs are now filterable. Kudos joshuadavidnelson.

#### 1.0.0 – 19/06/2015

 * Revamped button styles.
 * Updated textdomain to ‘woocommerce-grid-list-toggle’.
 * Code tidy up.

#### 0.4.0 – 04/02/2013

 * WooCommerce 2.1 compatibility.

#### 0.3.4 – 10/12/2013

 * Grid list toggle now appears on custom product taxonomies. Kudos dariodev.

#### 0.3.3 – 30/05/2013

 * Improved i18n
 * Added languages folder
 * Added default .po file for translators
 * Added full German translations for v0.3.2 (including the above enhancements)
 * Kudos deckerweb for all the above 🙂
 * Stripped object pass by reference

#### 0.3.2 – 08/02/2013

 * Product category descriptions now displayed in list view

#### 0.3.1 – 07/02/2013

 * Removed unnecessary default options

#### 0.3 – 30/01/2013

 * Added option to choose default view

#### 0.2.3 – 28/01/2013

 * Fixed active class bug on the toggle button
 * Styled the star-rating in list view

#### 0.2.2 – 16/01/2013

 * Re-applied button style. See FAQ to remove
 * YUI compressed CSS
 * Styles loaded on product tag archives

#### 0.2.1 – 10/01/2013

 * Add active class to grid button on initial load

#### 0.2 – 09/01/2013

 * Delayed gridlist_toggle_button() priority for better WooCommerce 2.0 compatibility
 * Even stricter CSS for list view (improves theme compatibility)
 * Changed #gridlist-toggle to .gridlist-toggle

#### 0.1.1 – 08/01/2013

 * Set grid as default view
 * Stricter CSS for list view
 * Only add the excerpt on shop / product category pages
 * Removed toggle button styling – this should be done in your theme

#### 0.1

Initial release.

## 额外信息

 *  版本 **1.2.1**
 *  最后更新：**8 年前**
 *  活跃安装数量 **10,000+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  语言
 * [Czech](https://cs.wordpress.org/plugins/woocommerce-grid-list-toggle/) 、 [English (US)](https://wordpress.org/plugins/woocommerce-grid-list-toggle/)、
   [French (France)](https://fr.wordpress.org/plugins/woocommerce-grid-list-toggle/)、
   [German](https://de.wordpress.org/plugins/woocommerce-grid-list-toggle/) 、 [Japanese](https://ja.wordpress.org/plugins/woocommerce-grid-list-toggle/)、
   [Portuguese (Brazil)](https://br.wordpress.org/plugins/woocommerce-grid-list-toggle/)、
   [Swedish](https://sv.wordpress.org/plugins/woocommerce-grid-list-toggle/) 和 
   [Ukrainian](https://uk.wordpress.org/plugins/woocommerce-grid-list-toggle/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/woocommerce-grid-list-toggle)
 * 标签
 * [ecommerce](https://cn.wordpress.org/plugins/tags/ecommerce/)[grid](https://cn.wordpress.org/plugins/tags/grid/)
   [list](https://cn.wordpress.org/plugins/tags/list/)[products](https://cn.wordpress.org/plugins/tags/products/)
   [woocommerce](https://cn.wordpress.org/plugins/tags/woocommerce/)
 *  [高级视图](https://cn.wordpress.org/plugins/woocommerce-grid-list-toggle/advanced/)

## 评级

 3.8 星（最高 5 星）。

 *  [  18 条 5 星评价     ](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/reviews/?filter=5)
 *  [  4 条 4 星评价     ](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/reviews/?filter=3)
 *  [  3 条 2 星评价     ](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/reviews/?filter=2)
 *  [  6 条 1 星评价     ](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/reviews/)

## 贡献者

 *   [ James Koster ](https://profiles.wordpress.org/jameskoster/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/woocommerce-grid-list-toggle/)