Archived topic
Product category grid
7 replies · Started by Synapse on December 22, 2022
I am creating a custom page with generatepress and generateblocks. I want to display a custom grid with the featured image and title of each product category. Is it possible? Thanks
Hi there,
For categories, you would have to do that manually if you want to build it with Blocks.
Otherwise it would take some code.
Yes, I already knew this way of doing it. But I need the grid to be updated when a new product category is created. I have tried to do it with loop element and custom WP_query but I can't get it
Is this Woocommerce ?
If so there is built in shortcode:
[product_categories]
Yes, this is woocommerce. I have used this shortcode but I am not able to display the grid.
I proceed as indicated in https://docs.generatepress.com/article/block-element-loop-template/
When element is inactive I can see the product category grid whit image. When element is activated I can not see anything.
Where is you want to display the category grid ? Is this on an archive page or a static page ?
static page
Don't use a Loop template, it won't work there, those are for Archive pages.
You can either add it directly to the Page itself.
Or if you're wanting to build a block based template then use GP Block Element - Content Template
