I’m trying to recreate a restaurant menu with one L&L template that I’d done previously by outputting multiple post modules in Beaver Builder.
The menu is a custom post type called “all_day_menu” – then each menu section has it’s own unique category, i.e. “salsas”, “antojitos”, “especiales”, etc. – Goal is to Display each category as a section - category title as section heading, then all the post cards in that category under it, then the next category section, etc.
Here’s the Beaver Builder version I’m trying to replicate:
https://bkhdevelopment.wpengine.com/menu/
Here’s the L&L version that I’m stuck on… Instead of displaying all post cards together under one category heading, it’s repeating category heading for each post card… know this is some loop within loop thing but I can’t seem to grasp it.
https://bkhdevelopment.wpengine.com/menu-test
Here’s my current L&L template:
<Loop type=all_day_menu taxonomy=category orderby=category>
<h2><Field category /></h2>
<section class="evg__menu-item__container">
<If loop type=taxonomy_term taxonomy=category>
<section class="evg__menu-item__item">
<div class="menu--heading__flex">
<div>
<h3 class="menu__item__name menu--heading__item">
<Field title />
</h3>
</div>
<div class="menu__item__price menu--heading__item">
<Field item_price></Field>
</div>
</div>
<div class="menu__item__description">
<Field description></Field>
</div>
<If loop acf_checkbox=indications>
<section class="evg__menu-indications__container">
<Loop>
<div class="menu__add-on__price menu__add-on__indications evg__menu-indications__item">
<Field />
</div>
</Loop>
</section>
</If>
<If loop exists acf_repeater=add-on_item>
<Loop>
<div class="menu__add-on__description">-
<Field add-ons />
<If loop acf_checkbox=add-on_indications>
<section class="evg__menu-indications__container">
<Loop>
<div class="menu__add-on__price menu__add-on__indications evg__menu-indications__item">
<Field />
</div>
</Loop>
</section>
</If>
<If exists field=add-on_price>
<span class="menu__add-on__price">
<span class="menu__add-on__price-plus">+</span>
<Field add-on_price /></span>
</If>
</div>
</Loop>
</If>
</section>
</If>
</section>
</Loop>```