Tell us what you are trying to do? link from a view to parent posts only if a parent exists
Is there any documentation that you are following?
Is there a similar example that we can see?
What is the link to your site?
- I have two custom post types with parent and child relationship: Workshops (Parent) and Series (Child) (I hope I did this correctly in Toolset)
- On a page of my site i display a view which is a list of both Workshops and Series, and in the View Loop i have a link that should take thw user to the correct post. If the item in the View Loop is a "Series", then I want the link to go to the Parent Workshop instead of the Series post itself, but if the item in the View Loop is a Workshop (i.e. it doesn't have a Parent), then I want the link to go to itself.
- Is this possible without conditional output?
I have tried the following :
<a href="[wpv-post-url id='$parent']">click for more details</a>
and
<a href="[wpv-post-link id='$parent']">click for more details</a>
However, it doesn't work. The links always go to the post itself, even if the child has a parent.