***Tell us what you are trying to do?***
I have a CPT called Inscription and the Inscription is child of 3 other types of CPT (atelier-et-rite, formation, voyage).
I start creating a view for displaying those events <a href="hidden link"> here </a>
I want to link the post title to the parent and not the current post.
I use this shortcode that display it correctly for one CPT
<a href="[wpv-post-url id='$atelier-et-rite']">[types field='titre-court-de-l-evenement'][/types]
I repeat it 3 times, one for each of those, but it prints 3 title.
Now, I try to find the perfect conditional code saying
IF parent post type of current post = name of the custom post type
display title and link
I haven't found this condition and I need help with it.
Thank you.
What is the link to your site?
hidden link
Dear Louis,
Please elaborate the question with more details:
IF parent post type of current post = name of the custom post type
display title and link
If you are going to compare the post title of current child post with post title of parent "atelier-et-rite" post, you can try with [wpv-conditional] shortcode like this:
[wpv-conditional if="( '[wpv-post-tite id='$atelier-et-rite']' eq '[wpv-post-tite]' )"]
display title and link
[/wpv-conditional]
More help:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/