Home › Forums › Support › Woocommerce shortcode not rendering correctly and is a woo query loop possible?
- This topic has 5 replies, 2 voices, and was last updated 4 months ago by
David.
-
AuthorPosts
-
September 2, 2022 at 7:23 pm #2332019
Michael
Hi folks- two questions? (both related)
I’m able to display the products using a simple [products] shortcode, but when I add more parameters, they don’t render on the front end.
[products category=”category-slug” columns=”4”] renders as one column. All the GP premium woo colors/fonts look great though.
I’ve seen another support topic that recommended a CSS band-aid, but was wondering if there is another, more structural solution?
Related to this question- If I find the Woo meta field names, is it possible to create my own product content template/card using elements and woo dynamic data, and just query loop these cards into my own woo shop page using Generateblocks? I’m a beginner of sorts, so apologies if this ignores other technical issues i might be unaware of.
Thanks as always!
Michael
September 3, 2022 at 3:14 am #2332225David
StaffCustomer SupportHi there,
by default the
[products]
shortcode will render whatever columns you define in the Customizer > Layout > Woocommerce settings.If you want to break from that, then you will need to add the
limit
parameter eg.[products limit="4" columns="2"]
So this will show 4 products in a 2 column grid. If you want all products then you can use
-1
for the limit. e.g[products category="category-slug" limit="-1" columns="2"]
Regarding the second question, ie. woo building with elements and generateblocks. No, not yet. We are looking at this, and the first step would be the product loop. But we have no timeline set.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 3, 2022 at 5:13 pm #2332712Michael
David- thanks a ton. Got it all sorted!
By the way- why do you think the woo data fields are inaccessible/unable to be used in dynamic posts? Security issue? Business decision? Just curious.
Look forward to more GB goodness in the future.
cheers
Michael
September 4, 2022 at 5:24 am #2332973David
StaffCustomer SupportSimple answer – Woo is complex.
We need to do a lot of integrations to make it work.
Simply retrieving the values from woos post tables wouldn’t suffice. Most of those are parsed in woo specific functions that return what you see eg. a Price w/without tax or sales discount. And there are also dedicated functions such as the Add to Cart form, that A LOT of other plugins hook into.But we will figure it out 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 18, 2022 at 7:42 pm #2422373Michael
belated thanks for the help on this! marking it as resolved. cheers-
November 19, 2022 at 5:02 am #2422743David
StaffCustomer SupportYou’re welcome
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.