[Resolved] Woocommerce shortcode not rendering correctly and is a woo query loop possible?

Home Forums Support [Resolved] Woocommerce shortcode not rendering correctly and is a woo query loop possible?

Home Forums Support Woocommerce shortcode not rendering correctly and is a woo query loop possible?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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

    #2332225
    David
    Staff
    Customer Support

    Hi 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.

    #2332712
    Michael

    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

    #2332973
    David
    Staff
    Customer Support

    Simple 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 🙂

    #2422373
    Michael

    belated thanks for the help on this! marking it as resolved. cheers-

    #2422743
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.