Updated on 4 Nov 2022.
This Pro tutorial provides the steps to show top-level WooCommerce product categories in Bricks using a query loop.
We shall output the product category image and name linked to the product category archive in a grid.
Let us first define a custom function that returns the product category image.
Add this in your child theme's functions.php or a code snippets plugin:
This is a Pro members-only tutorial.
To get full access, login below or sign up for a Pro Account
Sridhar Katakam is a WordPress expert with more than 12 years of experience. Sridhar is the founder of WPDevDesign and BricksLabs. He lives in Melbourne, Australia.
How to add category href links on the image for the title?
That is already taken care of.
After you paste the json code in your Bricks editor, you can see that the Block element has been set to be linked to term archive URL.
Hello, Sridhar. I am just starting to learn the bricks, and I don’t know where to paste the code in Step 2.
You can click anywhere in the canvas (the middle area in the Bricks editor) and paste or click on an empty area in the structure panel on the right and paste.
Yes, add me to your mailing list