Saltar navegación

Conditional Display of Content Within a View

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.

Este tema contiene 1 mensaje y tiene 0 respuestas.

Autor
Mensajes
#2881103

Tell us what you are trying to do?

I have a custom taxonomy type called "guests". I am able to properly display the content for a particular post using this shortcode: [wpv-post-taxonomy type="guests"]
The problem is that there are a few cases in which I have no guests, and a few other cases where the number of guests is too high, so the display looks bad.
I want to create an appropriate conditional display as follows:
If the count of "guests" is 0, then display "Nobody",
else if the count of "guests" > 3, then display "Multiple",
else display the full comma separated list of "guests".

Is there any documentation that you are following?

Your documentation on conditional shortcodes is NON-EXISTENT--I know it used to be there, but I can no longer find it, no matter what search terms I try.

Is there a similar example that we can see?
No.

What is the link to your site?
enlace oculto
You can see an example of bad display here: enlace oculto (there are too many guests listed in the first item on the page).