Change number of products per row

The category page shows four products per row by default. This can be changed using the function below (for example, changing it to 2). Note: This snippet may no longer be necessary as this number can be now easily be set in the customizer.