Forums
(@aaronfrancisis)
4 years, 1 month ago
or you can add this to public_html/wp-content/plugins/woocommerce-grid-list-toggle/assets/js/jquery.gridlistview.min.js But I haven’t verified this..
jQuery(document).ready(function(){ jQuery('ul.products').addClass('list'); });
I have found this works added to the functions.php
`<?php if (is_page(id)) { $defaultView = ‘list’; } /* else { $defaultView = ‘grid’; } */ setcookie(“gridcookie”, $defaultView); ?>
You can un-comment to change the default from grid or list view.