Problem:
When displaying posts from one side of a relationship (either individually, or listed by a View) how is it possible to display the number of related posts of some type?
Solution:
Create a View that queries the related post type and include a relationship Query Filter to limit the results to posts connected to the current post.
In the output section just after the wpv-items-found shortcode but before the wpv-loop tags output the count using the wpv-found-count shortcode. Don't include any other output (e.g. within the loop), and you would probably want to check the option to disable the wrapper div, depending on the context.
Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-found-count
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Este tema contiene 4 respuestas, tiene 2 mensajes.
Última actualización por hace 5 años, 8 meses.
Asistido por: Nigel.