Problem:
Display how many posts exist with some custom field value set. The number of posts, not the posts themselves.
Solution:
Create a View to query the post type in question and include a Query Filter to limit results to those with the required custom field value.
In the output section, don't include anything between the wpv-loop tags (which is output for each post). Immediately after the wpv-items-found shortcode insert the wpv-found-count shortcode which outputs the number of posts. In the wpv-no-items-found section output a zero.
You will want to disable the wrapper div.
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)
This topic contains 4 replies, has 2 voices.
Last updated by 5 years, 7 months ago.
Assisted by: Nigel.