I realise this is going to be something simple I am doing wrong…
I have a weblog with 5 trainers in it, and another with testimonials - 2 each - which is linked.
I am trying to output a list of all ten testimonials, under a heading, “What participants say”.
All is working ok, except I am getting the heading up 5 times - once for each trainer.
I will be really grateful if anyone can help.
Here’s the code:
{exp:weblog:entries weblog="trainers" orderby="date" sort="asc" disable="categories|pagination|trackbacks"}
{reverse_related_entries weblog="testimonials" limit="10" }
{if count == 1}
<div class=“section” id=“testimonials”>
What participants say
<ul>
{/if}
<li>
{g_body}
</li>
{if count == total_results}
</ul>
</div><!—/#testimonials—>
{/if}
{/reverse_related_entries}
{/exp:weblog:entries}