Problem: I would like to show a View of posts and calculate the total number of posts with each custom field value, like the results of a survey.
Solution: There's nothing built-in to Views that will calculate the total number of posts with a specific custom field value on-the-fly, so the display you described must be built out piece by piece using Views and Views shortcodes. You could use multiple filtered Views to achieve something similar. For example:
- View of submissions filtered by custom field "Question 1", answer "Yes"
- Use the wpv-found-count shortcode to output the number of submissions.
- View of submissions filtered by custom field "Question 1", answer "No"
- Use the wpv-found-count shortcode to output the number of submissions.
- View of submissions filtered by custom field "Question 1", answer "I don't know"
- Use the wpv-found-count shortcode to output the number of submissions.
- A second View of submissions filtered by custom field "Question 1", answer "No"
- In the loop output editor, display the "reason" free-response field
...and so on for each question.
Related documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#vf-155378
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 3 réponses, a 2 voix.
Dernière mise à jour par Jay Il y a 4 années et 10 mois.
Assisté par: Christian Cox.