I am working on a WordPress project using Advanced Custom Fields and cannot for the life of me figure out how to properly construct the loop to only display repeater sub fields IF there is content to populate the wrapping element. Here is a small album of
1. the code block i have so far (not doing exactly what i need, but close),
2. an inspected browser shot showing what is rendering,
3. a screenshot of the ACF field group in question.
[url removed, login to view]
So my "problem" is highlighted by the deep red bar across the content area (i only painted it red for this example) should not make it to the browser because it was never populated with ACF data. This block corresponds to the highlighted code in the inspector window so you can see what is surrounding it. The issue i am struggling with is that particular "box", as well as the ones above and below are empty, in that there is not supposed to be content, and therefore i wish these wrapping <div>s would not render. How do i get these to only make it to the browser IF there is actually content coming from ACF.
Some notes: I needed to set the ACF repeater up with a variable data inside so the user could select whether they are trying to inject a table, a chart, or a header for either one. The layout will be ever changing so in cannot program anything static.
Do i need to use some kind of "foreach" statement? is there a quick edit to what i have that will strip out the extra divs?
Thanks for your interest!
I might be willing to go over the $30 micro project if we come to an agreement, though i have a pretty good idea of how close this project already is to complete sans ~30 mins of work.