Support » Plugin: WooCommerce Grid / List toggle » [Plugin: WooCommerce Grid / List toggle] Make List View Default Instead of Grid

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author James Koster


    You can force list view to the the default with a little jQuery;


    That might mess up the active styling on the toggle buttons though so that might need attention too.

    Plugin Author James Koster


    Marking as resolved

    This is because I have no idea what I’m doing, but where do I add the jQuery?

    Nevermind I figured it out.


    How did you get this to work?


    Hey tigray, this will work if you paste the code at the end of jquery.gridlistview.min.js …

    I’m using this and a CSS display:none; on the toggle switches – my client wanted a list view (without a toggle, go figure) and this was the only way I could achieve it.

    Hi Coinmaster,

    Sorry but I am a bit thick and I keep getting a fatal error whe I try to paste the code…could you help me out and let me know exactly where to paste it..cheers

    In your plugins directory, you’ll have the Woocommerce Grid-List Toggle Plugin – go there, and open the following file:

    assets > js > jquery.gridlistview.min.js

    Put your cursor right at the end of the code there and paste in the code example from above. Save, upload and reload your page.

    Good luck!

    Much appreciated works perfectly!!!


    I’d like to eliminate my the toggle option also. (i just want list view only on my site) can you explain how you “use this [with] a CSS display:none on the toggle switches”?
    thanks in advance

    Thank you jameskoster for the plugin and coinmaster for the details! Works perfectly!

    democritus – you can hide the toggle switches by adding this to your custom.css

    #gridlist-toggle {
    	 display: none;

    that worked, thank you. do i need to add that every time I update wordpress?

    @democritus, you’ll probably (if @jameskoster won’t add this tweak to the plugin) need it only after upgrading the WooCommerce Grid / List toggle plugin. WP core or other plugins don’t affect each other.

    Great, and simple to use plugin, thank you.

    I’ve set up list view as the default, but is it possible to swap over the toggle button, as the grid view button is still showing as active when the list view first shows up.

    It’s MUCH simpler than that to have list be default. In the plugin editor on the PHP file there is this:

    // Default options
    add_option( ‘wc_glt_default’, ‘grid’ );

    Just change to list instead of grid and you’re done.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Plugin: WooCommerce Grid / List toggle] Make List View Default Instead of Grid’ is closed to new replies.