WordPress Storefront Theme Tutorial: How to Change the Number of Product Categories on Home Page

Опубликовано: 24 Март 2026
на канале: Breanna Hansen
501
10

The WordPress Storefront theme is great for creating an online business. It does, however, only display three product categories on the home page. If you want to change the number of WooCommerce product categories, all you need to do is add a little extra code! The code below will display 8 products categories in 2 rows and 4 columns. If you would like more or less rows, columns, or categories displayed, simply change the numbers in the code to reflect your design desires. Visit breannaghansen.com for more tutorials.

add_filter('storefront_product_categories_shortcode_args','custom_storefront_category_per_page' );

// Category Products
function custom_storefront_category_per_page( $args ) {
$args['number'] = 8;
$args['rows'] = 2;
$args['columns'] = 4;
return $args;
}