I’m having one of those days where a very simple thing is taking me hours!
Basically, I have a CPT with an ACF Post field, where the user can select a number of other posts within a sidebar of the main page. I’ve created a top-level DIV and set this as my ‘Looper Provider’. Then, within the DIV I’ve created a title, which will only display once as it’s not within the ‘Looper Consumer’. Finally, there’s another DIV, which is my ‘Looper Consumer’ and this happily loops through the output and displays the other posts as described above.
The issue I have is that no matter what I do, I can’t seem to hide the whole DIV if the provider output is empty. I’ve tried this on the ‘Looper Provider’ and the title always appears, even when the output is empty.