How to display a Category description on a Beaver Builder Category Archive Template using Loops & Logic

What is the easiest way to display a Product’s Category Description on an Beaver Builder Archive page using Loops & Logic?

You’ll want to create an L&L template on its own (i.e. don’t write the markup in a Beaver Builder Tangible Template module) and then call it into the “custom layout” of a posts module in Beaver Builder using the [template id=something] shortcode as Eliot suggested in this old thread of yours. It looks like WooCommerce products use a taxonomy called product_cat, so while I haven’t tested this, you might be able to create a taxonomy term loop for that product_cat taxonomy and then use the parameter post=current to grab the taxonomy term fields from the current post. I think the taxonomy term description field is just called “description” so if that’s the case, maybe you could then use <Field description /> within the loop and see what that outputs. When you add that template to a Beaver Builder custom layout using the shortcode, it should display the fields from each product post on your archive. You’ll need to play around with that to see how that works, but hopefully this gets you started.

1 Like

Hi Benjamin,

Thank you for the reminder about Templates. Your solution worked perfectly…

<Loop taxonomy=product_cat post=current>
  <Field description/>

I had entered HTML in the Product Category Description, so I was able to bring in everything from the Description field pre-formatted.

Now I can safely move over from Custom Content Shortcode to Loops & Logic.

Thank you once again!

1 Like