Problem:
How to display the number of posts of a particular type published by the current user (e.g. on their profile page).
Solution:
Create a View for the post type in question which has a Query Filter for the post author (equal to current user).
In the Loop Output section use the wpv-found-count shortcode like so to report the number of posts:
[wpv-layout-start] [wpv-items-found] <p>[wpv-found-count]</p> <!-- wpv-loop-start --> <wpv-loop> <!-- not outputting the posts --> </wpv-loop> <!-- wpv-loop-end --> [/wpv-items-found] [wpv-no-items-found] <p>0</p> [/wpv-no-items-found] [wpv-layout-end]
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)