Tell us what you are trying to do? Link a post within a loop to its parent page/post instead of itself
Is there any documentation that you are following? NO (I tried several with no luck)
Is there a similar example that we can see? I can provide in a private message
What is the link to your site? I can provide in a private message
On my site I have a page that lists a series of upcoming workshops within a view.
Each item in the loop has a link to its main details page.
For items in the loop that have parents (in my case, post types that are not "workshop") I prefer to link to their parent page instead, but I can't get it to work (although some code used to work in the past.)
I have tried:
[wpv-conditional if="( '[wpv-post-type]' ne 'workshop' )"]More Details[/wpv-conditional]
and:
[wpv-conditional if="( '[wpv-post-type]' ne 'workshop' )"]More Details[/wpv-conditional]
But neither seem to work. I'd be very grateful if anyone can help me solve this issue.
Hello,
It seems that the custom post type "workshop" is using slug "workshops", please try to change your shortcodes as below and test again:
[wpv-conditional if="( '[wpv-post-type]' ne 'workshops' )"]<a href="[wpv-post-url item='@workshops-series-events.parent']">More Details</a>[/wpv-conditional]