I'm trying to change number of items per row in product listing page.
I want to set different items per row for differant categories from: "admin panel > category > design > layout update xml"
Magento 1, Like this : < action method="setColumnCount"> < count> 4 < /count>< /action>
Above code I want to use in magento 2.
Best Answer
I struggled with a similar problem. My aim was to display no more than 4 products per row, using a custom theme which inherits from the blank theme.
In order to edit columns for regular catalog pages, you must copy the following directory:
to your theme directory:
If you would like to edit the widget columns as well, then you copy the following:
to your theme directory:
and adjust styles accordingly.
Here is an example of the CSS I used to neatly display 4 columns per row:
I won't display the whole code, because you'll need to adjust it for your particular needs.