Support » Theme: Storefront » homepage shows only 3 product categories
homepage shows only 3 product categories
-
On my homepage I can only see 3 of 5 product categories. How can I set it to show me all of them?
-
Can someone help? Please!!
Try this code in your child theme functions file:
add_filter( ‘storefront_product_categories_args’, ‘w3guy_storefront_product_categories’, 199 );
function w3guy_storefront_product_categories( $args ) {
$args[‘limit’] = 5;
$args[‘columns’] = 5;return $args;
}( taken from: https://w3guy.com/customizing-woocommerce-storefront-child-themes/ )
Hi,
Could it be the missing categories have not yet products assigned to them?
In that case they will not show up untill you do?Please share the url where this is happening if you need more help.
Are you using the homepage control plugin?Annie
LogoLogics thank you for the reply. No that was not the issue. The categories had products. Thank you though, anyway.
Corbett Enders Thank you that did the trick!
Thanks a million!!!Hi aspaee,
Glad Corbett Enders code worked out for you!
Annie
LogoLogics: 😀
Hi,
I have increased the columns with no bother, but i would like it to display in rows as well as columns.
e.g. i have 8 categories and i would like to display as 2 rows of 4.
Is this possible?
I have thought about hooking in and adding another row but this would require shortcodes and to then order them appropriately and this seems like a long way round.
Kind Regards
Alex-
This reply was modified 6 years, 5 months ago by
crabsandwich.
After following the link above it was clear that the way i was doing it was not working and the solution was to use decent code. Thank you to Corbett Enders and W3Guy.
I have used the code in my storefront childtheme but it seems not to be working.
add_filter( ‘storefront_product_categories_args’, ‘w3guy_storefront_product_categories’, 199 ); function w3guy_storefront_product_categories( $args ) { $args[‘limit’] = 5; $args[‘columns’] = 5; return $args; }
I used the code above.
I am currently using a blank storefront childtheme, is there anyway I can make it work?
My website is http://www.betafabrics.com-
This reply was modified 6 years ago by
bosunjohnson.
Hey @bosunjohnson
try this:
add_filter('storefront_product_categories_shortcode_args','custom_storefront_category_per_page' ); // Category Products function custom_storefront_category_per_page( $args ) { $args['limit'] = 10; return $args; }
You can find more snippets here:
https://atlantisthemes.com/change-storefront-homepage-layout/Thanks
Hi @cryptex_vinci
No luck yet. Still the same three categories. By the way I am using a blank child theme from https://github.com/stuartduff/storefront-child-themeThank you.
Hey @bosunjohnson)
My bad. It would be
add_filter('storefront_product_categories_shortcode_args','custom_storefront_category_per_page' ); // Category Products function custom_storefront_category_per_page( $args ) { $args['number'] = 10; return $args; }
Thanks
Hi @cryptex_vinci
Still not working.
Thanks for the help.Hi
Seems to be working fine from my end. Can you please activate the parent theme and let me know if the issue is still there.
Thanks
Unfortunately, I have activated the parent theme but its still the same problem.
the categories are still three and I cannot modify it. -
This reply was modified 6 years, 5 months ago by
- The topic ‘homepage shows only 3 product categories’ is closed to new replies.