Problem: I have a View that returns some text. I would like to use the output of that View in a conditional statement on another part of my site. I have already added the raw output PHP filter, and the output contains the correct text if I display the View on the front-end. However, the conditional still fails because of empty space in the View's output.
Solution: Be sure to remove all unnecessary empty space in the Loop Output editor of your View. The code should appear with no line breaks like this:
[wpv-layout-start][wpv-items-found]<!-- wpv-loop-start --><wpv-loop>[wpv-post-field name="wpcf-price"]</wpv-loop><!-- wpv-loop-end -->[/wpv-items-found][wpv-no-items-found]<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>[/wpv-no-items-found][wpv-layout-end]
Empty space surrounding the output will cause the conditional to fail.
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.
Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
Ce sujet contient 4 réponses, a 2 voix.
Dernière mise à jour par Il y a 6 années et 12 mois.
Assisté par: Christian Cox.