Problem:
I want to display the total child post count on the parent page.
I have a custom post type named 'Activities' and I have one more custom post type named 'Reviews'
The Reviews post type is a child of Activities.
I want to display the child post count on each parent page.
For example:
Parent: https://URL/activity/sailing-at-gateway-of-india-mumbai-seabird-sailboat/
Child 1: https://URL/review/8716/
Child 2: https://URL/review/8713/
Child 3: https://URL/review/8683/
The parent has 3 child posts.
On the parent page, I want to display the count i.e. 3.
Solution:
You can create a view to list child "review" posts:
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/
And display only the shortcode [wpv-found-count]:
https://toolset.com/documentation/user-guides/views-shortcodes/
Then put above view into the single parent "Activities" post for displaying the child post count
Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/
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.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
Este tema contiene 5 respuestas, tiene 2 mensajes.
Última actualización por hace 6 años, 10 meses.
Asistido por: Luo Yang.