Problem:
The issue here is that the user wanted to change the status of a child post when their parent post status is changed so that the child post isn't listed in their view.
Solution:
Unfortunately no this is not possible to do. You will need to set the child posts to pending as well manually.
What you can do however is to check the status of the parent post by using the shortcode below.
https://toolset.com/documentation/user-guides/views-shortcodes/#vf-153411
Then use the conditional shortcode to check.
So an example would be.
[wpv–conditional if="( '[wpv-post-status item='@cptslug.parent']' ne 'pending' )"] code here [/wpv–conditional]
So the code will check if the parent status is not pending. Now you will need to change @cptslug.parent to the slug of your parent cpt.
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/
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 |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
Este tema contiene 4 respuestas, tiene 2 mensajes.
Última actualización por hace 6 años, 3 meses.
Asistido por: Shane.