I have an acf_relationship field that holds two types of CPT. I have successfully been able to output data using
<If field=type value="wspid"> <Field custom_field_name /> </If>
Part of my journey is creating a circle with the total number of related posts of a certain type.
I have tried lots of different combinations but they all seem to output the loops total not taking into account the If statements.
<Loop acf_relationship=client_linked_spids> <If field=type value="wspid"> </If> </Loop> <div class="wspid-circle"> <Get loop=previous_total /> </div>
The above from my dataset displays 46 (which is the total number related posts) - however with the IF it should show 1.
I have also tried, but it didn’t work:
<Loop acf_relationship=client_linked_spids type=wspid>
I also tried using SET with the GET inside the IF but that didn’t work either
Any thoughts would be appreciated