Number of Columns on the Shop Page
Changes the number of product columns on the shop and product category pages for classic themes.
Opens WPIDE on
Code
add_filter( 'loop_shop_columns', function () {
return 3;
}, 20 );
Notes
Some themes control columns themselves and ignore this filter.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.