This support ticket is created 2 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
CPTs: "Centers" and "Units" with a many to many relationship
Custom Taxonomy: "Specialty"
"Specialty" is a taxonomy for both "Centers" and "Units".
Some Centers have Units, but others don´t.
This is part of the template for "Center":
Center A
Specialty 1
-- Unit 1
-- Unit 2
-- Unit 3
Specialty 2
-- Unit 4
-- Unit 5
Specialty 3
--Unit 6
This part´s output is shown through this view ("Specialties in a Center"):
<wpv-loop>
[wpv-post-body view_template="loop-item-in-specialties-in-a-center"] <!-- Shows the Specialty -->
[wpv-view name="units-in-a-hospital-per-specialty"] <!-- Shows the Units that have that Specialty-->
</wpv-loop>
It filters by taxonomy term defined by the current post.
The view loops the specialties of the Center, and then the Units that belong to each specialty.
If there is a Hospital that has no Units, then its specialties are shown with nothing below.
What I want is to show this area only for Centers that have Units. If there are no Units, the Specialty should not be shown.
Unfortunately no there isn't a way to do this. The main issue here is because we are not able to evaluate a view in a conditional tag in order to display a specific text.
Perhaps this can be done using some amount of custom code but defaultly it isn't possible to do.
Happy that you were able to resolve the issue. If there are any further issues I will be more than happy to assist. If not then you can go ahead and closed here.